Ticket #6336 (closed Bugs: fixed)

Opened 5 years ago

Last modified 5 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:


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

comment:1 Changed 5 years ago by igaztanaga

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

comment:2 Changed 5 years ago by igaztanaga

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

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 igaztanaga

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


Add a comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.