Re: [Boost-bugs] [Boost C++ Libraries] #7503: for_each does not compile with g++-4.7.1

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7503: for_each does not compile with g++-4.7.1
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-15 05:34:54


#7503: for_each does not compile with g++-4.7.1
------------------------------------------+---------------------------------
  Reporter: veso <vveesskkoo@…> | Owner: djowel
      Type: Bugs | Status: closed
 Milestone: Boost 1.52.0 | Component: fusion
   Version: Boost 1.51.0 | Severity: Problem
Resolution: fixed | Keywords:
------------------------------------------+---------------------------------
Changes (by djowel):

  * status: new => closed
  * resolution: => fixed

Comment:

 Better wrap your expression in an mpl::lambda to avoid eager evaluation
 (typename Pair_T::first_type). Here's how you do it:

     typedef is_same_key< double, boost::mpl::_1> expr;
     typedef boost::mpl::lambda<expr>::type func;
     fusion::for_each( fusion::filter_if<func>(map_sequence),
 print_ftor());

 See http://www.mywikinet.com/mpl/paper/html/lambda.html for details.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7503#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:10 UTC