Modify

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#6336 closed Bugs (fixed)

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

Reported by: Kohei Takahashi <flast@…> Owned by: Ion Gaztañaga
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 (0)

Change History (4)

comment:1 Changed 6 years ago by Ion Gaztañaga

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

comment:2 Changed 6 years ago by Ion Gaztañaga

Resolution: fixed
Status: newclosed

Merged to release branch

comment:3 Changed 5 years ago by achidlow@…

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

comment:4 Changed 5 years ago by Ion Gaztañaga

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ion Gaztañaga.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.