[mpl] for_each and set_c: misunderstanding or bug?
A friend of mine is having problems using setc with for_each. Given
the following code:
struct p
{
template<typename T>
void operator()(T) const
{ std::cout << typeid(T).name() << std::endl; }
};
typedef mpl::vector_c
AMDG Nevin ":-]" Liber wrote:
typedef mpl::vector_c
vc; typedef mpl::set< mpl::integral_c , mpl::integral_c > si; typedef mpl::set_c sc; int main() { mpl::for_each<vc>(p()); mpl::for_each<si>(p()); mpl::for_each<sc>(p()); // line does not compile }
It's definitely a bug since this simplified code fails
with the same error. I've attached a patch against
the trunk.
#include
participants (2)
-
Nevin ":-]" Liber
-
Steven Watanabe