
1 Sep
2010
1 Sep
'10
8:54 a.m.
AMDG Paul Graphov wrote:
I've encountered a problem while using mpl::fold with mpl::set
I've defined a template to check if one sequence contains all elements of the other:
namespace mpl = boost::mpl; template<class A, class B> struct subset : mpl::fold< A, mpl::true_, mpl::and_<mpl::_1, mpl::contains<B, mpl::_2> > > {};
It works fine with lists and vectors but when first template parameter (A) is set or set_c it fails to compile. Did I miss something? Why is it impossible to iterate through a set via fold?
It looks like fold is trying to increment past the end of the sequence. It works for me with the trunk with set, but not with set_c. I think the problem is that end<> is broken for set_c. In Christ, Steven Watanabe