Re: [Boost-bugs] [Boost C++ Libraries] #10071: [container] flat_map::insert() is ambiguous if used with initializer lists

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10071: [container] flat_map::insert() is ambiguous if used with initializer lists
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-01-09 18:35:02


#10071: [container] flat_map::insert() is ambiguous if used with initializer lists
-----------------------------------------------+------------------------
  Reporter: Sebastian Karlsson <sebastian@…> | Owner: igaztanaga
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: container
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
-----------------------------------------------+------------------------

Comment (by anonymous):

 As a first-time user of flat_map, I was pretty confused why

 {{{
 #!cpp
 insert( std::make_pair( x, y ) )
 }}}

 wasn't compiling, especially since the docs suggest that the Boost
 containers are drop-in replacements, and since flat_map::value_type is
 std::pair. At any rate, I just recommend including a note on proper usage
 in the descriptions for the insert() family.

 P.S. For anybody stumbling across this bug report after a Google search,
 you can use
 {{{
 #!cpp
 emplace( std::make_pair(x, y ) )
 }}}

 Still not { x, y }, though.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10071#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC