Re: [Boost-bugs] [Boost C++ Libraries] #8749: Accessing type of insert<map<>, pair<A, B> >::type discards inserted elements

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8749: Accessing type of insert<map<>, pair<A, B> >::type discards inserted elements
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-10-14 15:51:57


#8749: Accessing type of insert<map<>, pair<A,B> >::type discards inserted
elements
-------------------------------+-----------------------
  Reporter: guylaingreer@… | Owner: agurtovoy
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: mpl
   Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+-----------------------

Comment (by anonymous):

 This bug just bit me as well. I'm just learning MPL, so maybe this isn't
 the best way, but I was writing a little map insertion lambda..


 {{{
 typedef lambda<
     eval_if<
         has_key<_1, key_type<_1, _2>>,
         identity<_1>,
         insert<_1, _2>
>
>::type insert_if_new;
 }}}

 Which, based on the docs I have read, should clearly work, but it fails
 without the typedef above. This is on 1.56

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8749#comment:1>
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:17 UTC