Modify

Ticket #6336 (closed Bugs: fixed)

Opened 2 years ago

Last modified 2 years ago

return type of flat_map::emplace is not match to documents

Reported by: Kohei Takahashi <flast@…> Owned by: igaztanaga
Milestone: To Be Determined Component: container
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc:

Description

The document says, return type of flat_map.emplace is pair that contains iterator and bool. However actual type is iterator.

e.g. Boost.Unordered and standard library of emplace return pair. container::map::emplace returns iterator (map's doc is match to impl).

Which is correct?

Attachments

Change History

comment:1 Changed 2 years ago by igaztanaga

This is a bug, the standard library is correct. Fixed in trunk.

comment:2 Changed 2 years ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

Merged to release branch

comment:3 Changed 2 years ago by achidlow@…

Shouldn't emplace_hint also return std::pair<iterator, bool> ?

comment:4 Changed 2 years ago by igaztanaga

No, the standard interface for std::map/set::emplace_hint does not have it, just like insert with hint returns iterator.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.