|
Boost Users : |
Subject: Re: [Boost-users] [mpl] for_each and set_c: misunderstanding or bug?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-03-19 17:49:29
AMDG
Nevin ":-]" Liber wrote:
> typedef mpl::vector_c<int, 1, 2> vc;
> typedef mpl::set< mpl::integral_c<int, 1>, mpl::integral_c<int, 2> > si;
> typedef mpl::set_c<int, 1, 2> 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 <boost/mpl/set_c.hpp>
#include <boost/mpl/begin.hpp>
#include <boost/mpl/next.hpp>
typedef boost::mpl::set_c<int, 1> sc;
typedef boost::mpl::begin<sc>::type sc0;
typedef boost::mpl::next<sc0>::type sc1;
In Christ,
Steven Watanabe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net