id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 9840,phoenix V3 and stl container non const methods,Theodore.Papadopoulo@…,Thomas Heller,"I'm using boost 1.53 (boost-devel-1.53.0-6.fc19.i686). I think I found a bug with phoenix and stl methods. It looks like boost assumes that all methods are const which is not true (eg vector::reserve). I tried to change: {{{ #define BOOST_PHOENIX_ADAPT_CALLABLE(NAME, FUNC, N) \ template \ inline \ typename \ boost::phoenix::detail::expression::function_eval< \ FUNC \ , BOOST_PHOENIX_A(N)>::type const \ NAME(BOOST_PHOENIX_A_const_ref_a(N)) \ { \ return boost::phoenix::detail::expression:: \ function_eval:: \ make(FUNC(), BOOST_PHOENIX_a(N)); \ } \ }}} into {{{ #define BOOST_PHOENIX_ADAPT_CALLABLE(NAME, FUNC, N) \ template \ inline \ typename \ boost::phoenix::detail::expression::function_eval< \ FUNC \ , BOOST_PHOENIX_A(N)>::type const \ NAME(BOOST_PHOENIX_A_ref_a(N)) \ { \ return boost::phoenix::detail::expression:: \ function_eval:: \ make(FUNC(), BOOST_PHOENIX_a(N)); \ } \ }}} but that's not enough. That part of the problem remains in git. But that is not sufficient, some other method in the chain imposes constness. phoenix should not try to impose constness IMHO, the chain of instantiations should just pass the orginal type... Here is a (not totally simplified as it uses spirit) example to reproduce the problem: {{{ #include #include #include #include #include std::vector L; int main() { using namespace boost::spirit::qi; using namespace boost::phoenix; using boost::phoenix::arg_names::_1; const std::string str(""3 1 2 3""); std::string::const_iterator first = str.begin(); parse(first,str.end(), uint_[reserve(L,_1)] >> repeat(capacity(L))[ uint_ ]); } }}} ",Bugs,closed,To Be Determined,phoenix,Boost 1.53.0,Problem,invalid,stl container method,