Opened 10 years ago

Last modified 4 years ago

#7700 new Bugs

remove_if with Placeholder Expression as predicate causes instantiation of PlaceHolder Expression before argument binding in GCC 4.7.2

Reported by: felipe.m.almeida@… Owned by: Kohei Takahashi
Milestone: To Be Determined Component: fusion
Version: Boost 1.52.0 Severity: Regression
Keywords: Cc:

Description

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));

}

Attachments (1)

test-case.cpp (404 bytes ) - added by felipe.m.almeida@… 10 years ago.
Failing test case

Download all attachments as: .zip

Change History (2)

by felipe.m.almeida@…, 10 years ago

Attachment: test-case.cpp added

Failing test case

comment:1 by Kohei Takahashi, 4 years ago

Owner: changed from Joel de Guzman to Kohei Takahashi
Note: See TracTickets for help on using tickets.