concatenate boost::mpl::string <p>How I can concatenate boost::mpl::string? The following code produce errors:</p> <pre><code>#include &lt;iostream&gt; #include &lt;boost/mpl/vector.hpp&gt; #include &lt;boost/mpl/string.hpp&gt; #include &lt;boost/mpl/fold.hpp&gt; #include &lt;boost/mpl/placeholders.hpp&gt; #include &lt;boost/mpl/push_back.hpp&gt; typedef boost::mpl::vector&lt; boost::mpl::string&lt;'ab'&gt;, boost::mpl::string&lt;'cd'&gt;, boost::mpl::string&lt;'ef'&gt; &gt; slist; typedef boost::mpl::fold&lt; slist, boost::mpl::string&lt;&gt;, boost::mpl::push_back&lt;boost::mpl::_1, boost::mpl::_2&gt; &gt;::type string; int main() { std::cout &lt;&lt; boost::mpl::c_str&lt;string&gt;::value &lt;&lt; std::endl; } </code></pre> <p>full source here: <a href="http://liveworkspace.org/code/31902a4b1b0831d054119bc0b8923cb6" rel="nofollow">http://liveworkspace.org/code/31902a4b1b0831d054119bc0b8923cb6</a> errors:</p> <blockquote> <p>In file included from source.cpp:3:0: string.hpp: In instantiation of 'boost::mpl::push_back_impl&lt; boost::mpl::string_tag</p> <blockquote> <p>::apply, boost::mpl::string&lt;24930> >': boost/mpl/push_back.hpp:32:1:<br> instantiated from 'boost::mpl::push_back&lt; boost::mpl::string&lt;>, boost::mpl::string&lt;24930> ' boost/mpl/aux_/has_type.hpp:20:1:<br> instantiated from 'const bool boost::mpl::aux::has_type&lt; boost::mpl::push_back, boost::mpl::string&lt;24930> >, mpl_::bool_ ::value' boost/mpl/aux_/has_type.hpp:20:1:<br> instantiated from 'boost::mpl::aux::has_type&lt; boost::mpl::push_back, boost::mpl::string&lt;24930> >, mpl_::bool_ ' boost/mpl/aux_/preprocessed/gcc/quote.hpp:56:5: instantiated from 'boost::mpl::quote2&lt; boost::mpl::push_back ::apply, boost::mpl::string&lt;24930> >' boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp:49:1: instantiated from 'boost::mpl::apply_wrap2&lt; boost::mpl::quote2, boost::mpl::string&lt;>, boost::mpl::string&lt;24930> ' boost/mpl/aux_/preprocessed/gcc/bind.hpp:207:21: instantiated from 'boost::mpl::bind2&lt; boost::mpl::quote2, mpl_::arg&lt;1>, mpl_::arg&lt;2> ::apply, boost::mpl::string&lt;24930> >' boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp:49:1: instantiated from 'boost::mpl::apply_wrap2&lt; boost::mpl::protect&lt; boost::mpl::bind2, mpl_::arg&lt;1>, mpl_::arg&lt;2> >, 0 , boost::mpl::string&lt;>, boost::mpl::string&lt;24930> ' boost/mpl/aux_/preprocessed/gcc/apply.hpp:73:1: instantiated from 'boost::mpl::apply2&lt; boost::mpl::push_back, mpl_::arg&lt;2> >, boost::mpl::string&lt;>, boost::mpl::string&lt;24930> ' boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp:87:85: instantiated from 'boost::mpl::aux::fold_impl&lt; 3, boost::mpl::v_iter&lt; boost::mpl::vector, boost::mpl::string&lt;25444>, boost::mpl::string&lt;25958> >, 0l , boost::mpl::v_iter&lt; boost::mpl::vector, boost::mpl::string&lt;25444>, boost::mpl::string&lt;25958> >, 3l , boost::mpl::string&lt;>, boost::mpl::push_back, mpl_::arg&lt;2> > ' boost/mpl/fold.hpp:39:18: instantiated from 'boost::mpl::fold&lt; boost::mpl::vector, boost::mpl::string&lt;25444>, boost::mpl::string&lt;25958> > , boost::mpl::string&lt;>, boost::mpl::push_back, mpl_::arg&lt;2> > ' source.cpp:18:2: instantiated from here string.hpp:207:53: error: 'value' is not a member of 'boost::mpl::string&lt;24930>' In file included from boost/mpl/back_inserter.hpp:18:0, from boost/mpl/aux_/inserter_algorithm.hpp:18, from boost/mpl/copy.hpp:20, from string.hpp:26, from source.cpp:3: boost/mpl/push_back.hpp: In instantiation of 'boost::mpl::push_back&lt; boost::mpl::push_back, boost::mpl::string&lt;24930> >, boost::mpl::string&lt;25444> ': boost/mpl/aux_/has_type.hpp:20:1:<br> instantiated from 'const bool boost::mpl::aux::has_type&lt; boost::mpl::push_back&lt; boost::mpl::push_back, boost::mpl::string&lt;24930> >, boost::mpl::string&lt;25444> , mpl_::bool_ ::value' boost/mpl/aux_/has_type.hpp:20:1:<br> instantiated from 'boost::mpl::aux::has_type&lt; boost::mpl::push_back&lt; boost::mpl::push_back, boost::mpl::string&lt;24930> >, boost::mpl::string&lt;25444> , mpl_::bool_ ' boost/mpl/aux_/preprocessed/gcc/quote.hpp:56:5: instantiated from 'boost::mpl::quote2&lt; boost::mpl::push_back</p> </blockquote> </blockquote>