Boost C++ Libraries: Ticket #12732: Karma problem converting a char vector to string https://svn.boost.org/trac10/ticket/12732 <p> The version of Boost.Spirit.Karma included with Boost 1.63.0 appears to have a problem converting a char vector to a string when building with Apple Clang 8.0 using the <code>-std=c++14</code> (or <code>-std=gnu++14</code>) option. Consider the following example: </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;boost/spirit/include/karma.hpp&gt;</span><span class="cp"></span> <span class="cp">#include</span> <span class="cpf">&lt;boost/fusion/include/adapt_struct.hpp&gt;</span><span class="cp"></span> <span class="k">struct</span> <span class="n">foo</span> <span class="p">{</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">;</span> <span class="p">};</span> <span class="n">BOOST_FUSION_ADAPT_STRUCT</span><span class="p">(</span> <span class="n">foo</span><span class="p">,</span> <span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="p">,</span> <span class="n">a</span><span class="p">)</span> <span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span> <span class="p">)</span> <span class="kt">int</span> <span class="n">main</span><span class="p">()</span> <span class="p">{</span> <span class="k">using</span> <span class="k">namespace</span> <span class="n">boost</span><span class="o">::</span><span class="n">spirit</span><span class="o">::</span><span class="n">karma</span><span class="p">;</span> <span class="k">typedef</span> <span class="n">rule</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">back_insert_iterator</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span><span class="p">,</span> <span class="n">foo</span><span class="p">(),</span> <span class="n">space_type</span><span class="o">&gt;</span> <span class="n">rule_t</span><span class="p">;</span> <span class="n">rule_t</span> <span class="n">r</span> <span class="o">=</span> <span class="o">+</span><span class="n">char_</span> <span class="o">&lt;&lt;</span> <span class="sc">&#39;(&#39;</span> <span class="o">&lt;&lt;</span> <span class="n">string</span> <span class="o">&lt;&lt;</span> <span class="sc">&#39;)&#39;</span> <span class="o">|</span> <span class="n">skip</span><span class="p">[</span><span class="n">string</span><span class="p">]</span> <span class="o">&lt;&lt;</span> <span class="n">string</span> <span class="p">;</span> <span class="n">foo</span> <span class="n">f</span> <span class="o">=</span> <span class="p">{</span><span class="s">&quot;a&quot;</span><span class="p">,</span> <span class="s">&quot;b&quot;</span><span class="p">};</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">s</span><span class="p">;</span> <span class="n">generate_delimited</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">back_inserter</span><span class="p">(</span><span class="n">s</span><span class="p">),</span> <span class="n">r</span><span class="p">,</span> <span class="n">space</span><span class="p">,</span> <span class="n">f</span><span class="p">);</span> <span class="p">}</span> </pre></div></div><p> When compiled with the -std=c++14 and -stdlib=libc++ options, the following errors are emitted: </p> <pre class="wiki">$ c++ -I ~/Build/ng-core-Debug/API/inc -std=c++14 -stdlib=libc++ -o karma-char-seq karma-char-seq.cpp In file included from karma-char-seq.cpp:1: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/phoenix.hpp:11: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/phoenix/phoenix.hpp:11: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/phoenix/core.hpp:13: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/phoenix/core/debug.hpp:17: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/proto/proto.hpp:12: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/proto/core.hpp:21: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/proto/fusion.hpp:22: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/fusion/include/intrinsic.hpp:11: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/fusion/sequence/intrinsic.hpp:23: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/fusion/sequence/intrinsic/swap.hpp:15: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/fusion/view/zip_view.hpp:12: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/fusion/view/zip_view/zip_view.hpp:16: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/fusion/view/zip_view/detail/begin_impl.hpp:14: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/fusion/algorithm/transformation/transform.hpp:11: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/fusion/view/transform_view/transform_view.hpp:22: In file included from /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/fusion/container/vector/vector10.hpp:25: /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/fusion/container/vector/vector.hpp:168:19: error: no matching constructor for initialization of 'std::__1::vector&lt;char, std::__1::allocator&lt;char&gt; &gt;' : elem(std::forward&lt;U&gt;(rhs)) ^ ~~~~~~~~~~~~~~~~~~~~ /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/fusion/container/vector/vector.hpp:208:19: note: in instantiation of function template specialization 'boost::fusion::vector_detail::store&lt;0, std::__1::vector&lt;char, std::__1::allocator&lt;char&gt; &gt; &gt;::store&lt;std::__1::basic_string&lt;char&gt; &amp;, void&gt;' requested here : store&lt;I, T&gt;(forward_at_c&lt;I&gt;(std::forward&lt;Sequence&gt;(rhs)))... ^ /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/fusion/container/vector/vector.hpp:319:15: note: in instantiation of function template specialization 'boost::fusion::vector_detail::vector_data&lt;boost::fusion::detail::index_sequence&lt;0, 1&gt;, std::__1::vector&lt;char, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char&gt; &gt;::vector_data&lt;foo, foo, void&gt;' requested here : base(vector_detail::each_elem(), std::forward&lt;Sequence&gt;(seq)) ^ /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/type_traits/is_convertible.hpp:482:56: note: in instantiation of function template specialization 'boost::fusion::vector&lt;std::__1::vector&lt;char, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char&gt; &gt;::vector&lt;foo, foo, void&gt;' requested here struct is_convertible : public integral_constant&lt;bool, BOOST_IS_CONVERTI... ^ /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/type_traits/intrinsics.hpp:214:63: note: expanded from macro 'BOOST_IS_CONVERTIBLE' # define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U) ^ /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/spirit/home/support/attributes.hpp:309:13: note: in instantiation of template class 'boost::is_convertible&lt;foo, boost::fusion::vector&lt;std::__1::vector&lt;char, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char&gt; &gt; &gt;' requested here : is_convertible&lt;Attribute, Expected&gt; ^ /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/mpl/aux_/nested_type_wknd.hpp:27:7: note: in instantiation of template class 'boost::spirit::traits::detail::attribute_is_compatible&lt;boost::fusion::vector&lt;std::__1::vector&lt;char, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char&gt; &gt;, foo&gt;' requested here : T::type ^ /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/mpl/aux_/preprocessed/gcc/or.hpp:51:11: note: (skipping 12 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value ^ /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/mpl/aux_/nested_type_wknd.hpp:38:24: note: expanded from macro 'BOOST_MPL_AUX_NESTED_TYPE_WKND' ::boost::mpl::aux::nested_type_wknd&lt;T&gt; \ ^ /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/function/function_template.hpp:1072:5: note: in instantiation of function template specialization 'boost::function3&lt;bool, boost::spirit::karma::detail::output_iterator&lt;std::__1::back_insert_iterator&lt;std::__1::basic_string&lt;char&gt; &gt;, mpl_::int_&lt;15&gt;, boost::spirit::unused_type&gt; &amp;, boost::spirit::context&lt;boost::fusion::cons&lt;const foo &amp;, boost::fusion::nil_&gt;, boost::fusion::vector&lt;&gt; &gt; &amp;, const boost::spirit::karma::any_space&lt;boost::spirit::char_encoding::standard&gt; &amp;&gt;::function3&lt;boost::spirit::karma::detail::generator_binder&lt;boost::spirit::karma::alternative&lt;boost::fusion::cons&lt;boost::spirit::karma::sequence&lt;boost::fusion::cons&lt;boost::spirit::karma::plus&lt;boost::spirit::karma::any_char&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type&gt; &gt;, boost::fusion::cons&lt;boost::spirit::karma::literal_char&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type, true&gt;, boost::fusion::cons&lt;boost::spirit::karma::any_string&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type&gt;, boost::fusion::cons&lt;boost::spirit::karma::literal_char&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type, true&gt;, boost::fusion::nil_&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::karma::sequence&lt;boost::fusion::cons&lt;boost::spirit::karma::omit_directive&lt;boost::spirit::karma::any_string&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type&gt;, false&gt;, boost::fusion::cons&lt;boost::spirit::karma::any_string&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type&gt;, boost::fusion::nil_&gt; &gt; &gt;, boost::fusion::nil_&gt; &gt; &gt;, mpl_::bool_&lt;false&gt; &gt; &gt;' requested here base_type(f) ^ /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/function/function_template.hpp:1125:5: note: in instantiation of function template specialization 'boost::function&lt;bool (boost::spirit::karma::detail::output_iterator&lt;std::__1::back_insert_iterator&lt;std::__1::basic_string&lt;char&gt; &gt;, mpl_::int_&lt;15&gt;, boost::spirit::unused_type&gt; &amp;, boost::spirit::context&lt;boost::fusion::cons&lt;const foo &amp;, boost::fusion::nil_&gt;, boost::fusion::vector&lt;&gt; &gt; &amp;, const boost::spirit::karma::any_space&lt;boost::spirit::char_encoding::standard&gt; &amp;)&gt;::function&lt;boost::spirit::karma::detail::generator_binder&lt;boost::spirit::karma::alternative&lt;boost::fusion::cons&lt;boost::spirit::karma::sequence&lt;boost::fusion::cons&lt;boost::spirit::karma::plus&lt;boost::spirit::karma::any_char&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type&gt; &gt;, boost::fusion::cons&lt;boost::spirit::karma::literal_char&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type, true&gt;, boost::fusion::cons&lt;boost::spirit::karma::any_string&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type&gt;, boost::fusion::cons&lt;boost::spirit::karma::literal_char&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type, true&gt;, boost::fusion::nil_&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::karma::sequence&lt;boost::fusion::cons&lt;boost::spirit::karma::omit_directive&lt;boost::spirit::karma::any_string&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type&gt;, false&gt;, boost::fusion::cons&lt;boost::spirit::karma::any_string&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type&gt;, boost::fusion::nil_&gt; &gt; &gt;, boost::fusion::nil_&gt; &gt; &gt;, mpl_::bool_&lt;false&gt; &gt; &gt;' requested here self_type(f).swap(*this); ^ /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/spirit/home/karma/nonterminal/rule.hpp:192:19: note: in instantiation of function template specialization 'boost::function&lt;bool (boost::spirit::karma::detail::output_iterator&lt;std::__1::back_insert_iterator&lt;std::__1::basic_string&lt;char&gt; &gt;, mpl_::int_&lt;15&gt;, boost::spirit::unused_type&gt; &amp;, boost::spirit::context&lt;boost::fusion::cons&lt;const foo &amp;, boost::fusion::nil_&gt;, boost::fusion::vector&lt;&gt; &gt; &amp;, const boost::spirit::karma::any_space&lt;boost::spirit::char_encoding::standard&gt; &amp;)&gt;::operator=&lt;boost::spirit::karma::detail::generator_binder&lt;boost::spirit::karma::alternative&lt;boost::fusion::cons&lt;boost::spirit::karma::sequence&lt;boost::fusion::cons&lt;boost::spirit::karma::plus&lt;boost::spirit::karma::any_char&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type&gt; &gt;, boost::fusion::cons&lt;boost::spirit::karma::literal_char&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type, true&gt;, boost::fusion::cons&lt;boost::spirit::karma::any_string&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type&gt;, boost::fusion::cons&lt;boost::spirit::karma::literal_char&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type, true&gt;, boost::fusion::nil_&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::karma::sequence&lt;boost::fusion::cons&lt;boost::spirit::karma::omit_directive&lt;boost::spirit::karma::any_string&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type&gt;, false&gt;, boost::fusion::cons&lt;boost::spirit::karma::any_string&lt;boost::spirit::char_encoding::standard, boost::spirit::unused_type&gt;, boost::fusion::nil_&gt; &gt; &gt;, boost::fusion::nil_&gt; &gt; &gt;, mpl_::bool_&lt;false&gt; &gt; &gt;' requested here lhs.f = detail::bind_generator&lt;Auto&gt;( ^ /Users/mcdanb/Build/ng-core-Debug/API/inc/boost/spirit/home/karma/nonterminal/rule.hpp:201:13: note: in instantiation of function template specialization 'boost::spirit::karma::rule&lt;std::__1::back_insert_iterator&lt;std::__1::basic_string&lt;char&gt; &gt;, foo (), boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0&gt;, boost::spirit::unused_type, boost::spirit::unused_type&gt;::define&lt;mpl_::bool_&lt;false&gt;, boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::bitwise_or, boost::proto::argsns_::list2&lt;const boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2&lt;const boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2&lt;const boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2&lt;const boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::unary_plus, boost::proto::argsns_::list1&lt;const boost::spirit::terminal&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt; &amp;&gt;, 1&gt; &amp;, boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;const char &amp;&gt;, 0&gt; &gt;, 2&gt; &amp;, const boost::spirit::terminal&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::string, boost::spirit::char_encoding::standard&gt; &gt; &amp;&gt;, 2&gt; &amp;, boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;const char &amp;&gt;, 0&gt; &gt;, 2&gt; &amp;, const boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2&lt;const boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::subscript, boost::proto::argsns_::list2&lt;const boost::spirit::terminal&lt;boost::spirit::tag::skip&gt; &amp;, const boost::spirit::terminal&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::string, boost::spirit::char_encoding::standard&gt; &gt; &amp;&gt;, 2&gt; &amp;, const boost::spirit::terminal&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::string, boost::spirit::char_encoding::standard&gt; &gt; &amp;&gt;, 2&gt; &amp;&gt;, 2&gt; &gt;' requested here define&lt;mpl::false_&gt;(*this, expr, traits::matches&lt;karma::doma... ^ karma-char-seq.cpp:24:13: note: in instantiation of function template specialization 'boost::spirit::karma::rule&lt;std::__1::back_insert_iterator&lt;std::__1::basic_string&lt;char&gt; &gt;, foo (), boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0&gt;, boost::spirit::unused_type, boost::spirit::unused_type&gt;::rule&lt;boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::bitwise_or, boost::proto::argsns_::list2&lt;const boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2&lt;const boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2&lt;const boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2&lt;const boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::unary_plus, boost::proto::argsns_::list1&lt;const boost::spirit::terminal&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt; &amp;&gt;, 1&gt; &amp;, boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;const char &amp;&gt;, 0&gt; &gt;, 2&gt; &amp;, const boost::spirit::terminal&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::string, boost::spirit::char_encoding::standard&gt; &gt; &amp;&gt;, 2&gt; &amp;, boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;const char &amp;&gt;, 0&gt; &gt;, 2&gt; &amp;, const boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2&lt;const boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::subscript, boost::proto::argsns_::list2&lt;const boost::spirit::terminal&lt;boost::spirit::tag::skip&gt; &amp;, const boost::spirit::terminal&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::string, boost::spirit::char_encoding::standard&gt; &gt; &amp;&gt;, 2&gt; &amp;, const boost::spirit::terminal&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::string, boost::spirit::char_encoding::standard&gt; &gt; &amp;&gt;, 2&gt; &amp;&gt;, 2&gt; &gt;' requested here = +char_ &lt;&lt; '(' &lt;&lt; string &lt;&lt; ')' ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:489:40: note: candidate constructor not viable: no known conversion from 'std::__1::basic_string&lt;char&gt;' to 'const allocator_type' (aka 'const std::__1::allocator&lt;char&gt;') for 1st argument _LIBCPP_INLINE_VISIBILITY explicit vector(const allocator_type&amp; __a) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:501:14: note: candidate constructor not viable: no known conversion from 'std::__1::basic_string&lt;char&gt;' to 'size_type' (aka 'unsigned long') for 1st argument explicit vector(size_type __n); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:537:5: note: candidate constructor not viable: no known conversion from 'std::__1::basic_string&lt;char&gt;' to 'initializer_list&lt;value_type&gt;' (aka 'initializer_list&lt;char&gt;') for 1st argument vector(initializer_list&lt;value_type&gt; __il); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:549:5: note: candidate constructor not viable: no known conversion from 'std::__1::basic_string&lt;char&gt;' to 'const std::__1::vector&lt;char, std::__1::allocator&lt;char&gt; &gt;' for 1st argument vector(const vector&amp; __x); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:555:5: note: candidate constructor not viable: no known conversion from 'std::__1::basic_string&lt;char&gt;' to 'std::__1::vector&lt;char, std::__1::allocator&lt;char&gt; &gt;' for 1st argument vector(vector&amp;&amp; __x) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:508:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided vector(_InputIterator __first, ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:516:9: note: candidate constructor template not viable: requires at least 3 arguments, but 1 was provided vector(_InputIterator __first, _InputIterator __last, const allo... ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:523:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided vector(_ForwardIterator __first, ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:530:9: note: candidate constructor template not viable: requires at least 3 arguments, but 1 was provided vector(_ForwardIterator __first, _ForwardIterator __last, const ... ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:483:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided vector() _NOEXCEPT_(is_nothrow_default_constructible&lt;allocator_type&gt;::value) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:503:14: note: candidate constructor not viable: requires 2 arguments, but 1 was provided explicit vector(size_type __n, const allocator_type&amp; __a); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:505:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided vector(size_type __n, const_reference __x); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:539:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided vector(initializer_list&lt;value_type&gt; __il, const allocator_type&amp; __a); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:550:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided vector(const vector&amp; __x, const allocator_type&amp; __a); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:562:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided vector(vector&amp;&amp; __x, const allocator_type&amp; __a); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:506:5: note: candidate constructor not viable: requires 3 arguments, but 1 was provided vector(size_type __n, const_reference __x, const allocator_type&amp; __a); ^ 1 error generated. </pre><p> The problem construct appears to be <code>+char_</code>. The error goes away if it is replaced with <code>string</code>; but the error also goes away if the alternative is removed from the rule. </p> <p> This code worked fine with the Boost.Spirit.Karma included with Boost 1.62.0. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12732 Trac 1.4.3 Braden McDaniel <braden@…> Fri, 06 Jan 2017 15:17:38 GMT attachment set https://svn.boost.org/trac10/ticket/12732 https://svn.boost.org/trac10/ticket/12732 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">karma-char-seq.cpp</span> </li> </ul> <p> Example </p> Ticket Braden McDaniel <braden@…> Mon, 01 May 2017 15:11:33 GMT version changed https://svn.boost.org/trac10/ticket/12732#comment:1 https://svn.boost.org/trac10/ticket/12732#comment:1 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.63.0</span> → <span class="trac-field-new">Boost 1.64.0</span> </li> </ul> <p> Still a problem in Boost 1.64.0. </p> Ticket Braden McDaniel <braden@…> Tue, 02 May 2017 14:51:33 GMT component changed https://svn.boost.org/trac10/ticket/12732#comment:2 https://svn.boost.org/trac10/ticket/12732#comment:2 <ul> <li><strong>component</strong> <span class="trac-field-old">spirit</span> → <span class="trac-field-new">fusion</span> </li> </ul> Ticket