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: | 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)
Change History (2)
by , 10 years ago
Attachment: | test-case.cpp added |
---|
comment:1 by , 4 years ago
Owner: | changed from | to
---|
Failing test case