[Boost-bugs] [Boost C++ Libraries] #7700: remove_if with Placeholder Expression as predicate causes instantiation of PlaceHolder Expression before argument binding in GCC 4.7.2

Subject: [Boost-bugs] [Boost C++ Libraries] #7700: remove_if with Placeholder Expression as predicate causes instantiation of PlaceHolder Expression before argument binding in GCC 4.7.2
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-11-15 15:48:10


#7700: remove_if with Placeholder Expression as predicate causes instantiation of
PlaceHolder Expression before argument binding in GCC 4.7.2
----------------------------------------+-----------------------------------
 Reporter: felipe.m.almeida@… | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: fusion
  Version: Boost 1.52.0 | Severity: Regression
 Keywords: |
----------------------------------------+-----------------------------------
 The following code instantiates meta_func<mpl::arg<1> >, which causes a
 compile error.

 The problem seems to be with the mpl::not_ which involves the predicate
 with remove_if. The same error doesn't happen with filter_if. The
 equivalent code in MPL-only doesn't cause the same error (mpl::remove_if).

 #include <boost/fusion/include/as_vector.hpp>
 #include <boost/fusion/include/remove_if.hpp>

 namespace mpl = boost::mpl;
 namespace fusion = boost::fusion;

 struct element
 {
    typedef mpl::false_ type;
 };

 template <typename T>
 struct meta_func
 {
    typedef typename T::type type;
 };

 int main()
 {
    fusion::vector<element, element> e;
    fusion::as_vector(fusion::remove_if<meta_func<mpl::_1> >(e));
 }

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