Opened 11 years ago

Closed 11 years ago

Last modified 11 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?

Change History (4)

comment:1 by Ion Gaztañaga, 11 years ago

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

comment:2 by Ion Gaztañaga, 11 years ago

Resolution: fixed
Status: newclosed

Merged to release branch

comment:3 by achidlow@…, 11 years ago

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

comment:4 by Ion Gaztañaga, 11 years ago

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

Note: See TracTickets for help on using tickets.