Boost C++ Libraries: Ticket #13404: boost::container::container_detail::forward_as_tuple conflicts with std::forward_as_tuple https://svn.boost.org/trac10/ticket/13404 <p> Internals of libc++ make unqualified calls to forward_as_tuple; this may result in the "call ... is ambiguous" error if boost::container::container_detail is one of the associated namespaces for the call. </p> <p> E.g. test.cpp: </p> <pre class="wiki">#include &lt;boost/container/set.hpp&gt; #include &lt;tuple&gt; int main() { boost::container::set&lt;int&gt; set; std::tuple_cat(std::make_tuple(set)); } </pre><p> The terminal: </p> <pre class="wiki">$ clang++-5.0 ~/tmp/test.cpp -std=c++14 -o test -stdlib=libc++ -isystem ./boost_1_66_0 In file included from /home/brd/tmp/test.cpp:1: In file included from ./boost_1_66_0/boost/container/set.hpp:28: In file included from ./boost_1_66_0/boost/container/detail/tree.hpp:36: In file included from ./boost_1_66_0/boost/container/detail/node_alloc_holder.hpp:30: In file included from ./boost_1_66_0/boost/container/detail/allocator_version_traits.hpp:26: In file included from ./boost_1_66_0/boost/container/throw_exception.hpp:27: In file included from /home/brd/soft/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/../include/c++/v1/string:470: In file included from /home/brd/soft/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/../include/c++/v1/string_view:169: In file included from /home/brd/soft/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/../include/c++/v1/__string:56: In file included from /home/brd/soft/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/../include/c++/v1/algorithm:643: In file included from /home/brd/soft/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/../include/c++/v1/memory:653: /home/brd/soft/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/../include/c++/v1/tuple:1318:16: error: call to 'forward_as_tuple' is ambiguous return forward_as_tuple(_VSTD::forward&lt;_Types&gt;(_VSTD::get&lt;_I0&gt;(__t))..., ^~~~~~~~~~~~~~~~ /home/brd/soft/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/../include/c++/v1/tuple:1348:12: note: in instantiation of function template specialization 'std::__1::__tuple_cat&lt;std::__1::tuple&lt;&gt;, std::__1::__tuple_indices&lt;&gt;, std::__1::__tuple_indices&lt;0&gt; &gt;::operator()&lt;std::__1::tuple&lt;boost::container::set&lt;int, std::__1::less&lt;int&gt;, boost::container::new_allocator&lt;int&gt;, boost::container::tree_opt&lt;boost::container::tree_type_enum::red_black_tree, true&gt; &gt; &gt; &gt;' requested here return __tuple_cat&lt;tuple&lt;&gt;, __tuple_indices&lt;&gt;, ^ /home/brd/tmp/test.cpp:8:10: note: in instantiation of function template specialization 'std::__1::tuple_cat&lt;std::__1::tuple&lt;boost::container::set&lt;int, std::__1::less&lt;int&gt;, boost::container::new_allocator&lt;int&gt;, boost::container::tree_opt&lt;boost::container::tree_type_enum::red_black_tree, true&gt; &gt; &gt;&gt;' requested here std::tuple_cat(std::make_tuple(set)); ^ ./boost_1_66_0/boost/container/detail/variadic_templates_tools.hpp:81:20: note: candidate function [with Values = &lt;boost::container::set&lt;int, std::__1::less&lt;int&gt;, boost::container::new_allocator&lt;int&gt;, boost::container::tree_opt&lt;boost::container::tree_type_enum::red_black_tree, true&gt; &gt;&gt;] tuple&lt;Values&amp;&amp;...&gt; forward_as_tuple(Values&amp;&amp;... values) ^ /home/brd/soft/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/../include/c++/v1/tuple:1114:1: note: candidate function [with _Tp = &lt;boost::container::set&lt;int, std::__1::less&lt;int&gt;, boost::container::new_allocator&lt;int&gt;, boost::container::tree_opt&lt;boost::container::tree_type_enum::red_black_tree, true&gt; &gt;&gt;] forward_as_tuple(_Tp&amp;&amp;... __t) _NOEXCEPT ^ 1 error generated. </pre><p> P.S. I wonder, why is boost::container::container_detail::forward_as_tuple needed at all, since it doesn't seem to be used outside of tests. Can it be removed? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13404 Trac 1.4.3