Boost logo

Boost :

Subject: [boost] [mpl] mpl::c_str fails for mpl::push_back
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-11-06 20:51:04


Hi,

the following results in a compile error for msvc-10.0. It works for gcc-3.4, gcc-4.3, gcc-4.5.

typedef mpl::vector_c<char, 'h','e','l','l','o',' ','w','o','r','l','d'> hello;

typedef mpl::push_back<hello, mpl::char_<'!'> >::type hello2;

BOOST_TEST((std::string(mpl::c_str<hello2>::value)== "hello world!")); // line 59

C:\cygwin\boost\v44\boost/mpl/string.hpp(592) : error C2039: 'value_type' : is not a member of 'boost::mpl::vector12<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>'
        with
        [
            T0=boost::mpl::integral_c<char,104>,
            T1=boost::mpl::integral_c<char,101>,
            T2=boost::mpl::integral_c<char,108>,
            T3=boost::mpl::integral_c<char,108>,
            T4=boost::mpl::integral_c<char,111>,
            T5=boost::mpl::integral_c<char,32>,
            T6=boost::mpl::integral_c<char,119>,
            T7=boost::mpl::integral_c<char,111>,
            T8=boost::mpl::integral_c<char,114>,
            T9=boost::mpl::integral_c<char,108>,
            T10=boost::mpl::integral_c<char,100>,
            T11=boost::mpl::char_<33>
        ]
        io\match_pass.cpp(59) : see reference to class template instantiation 'boost::mpl::c_str<Sequence>' being compiled
        with
        [
            Sequence=hello2
        ]

Is this a known bug?

Best,
_____________________
Vicente Juan Botet Escribá
http://viboes.blogspot.com/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk