Boost C++ Libraries: Ticket #7914: std::tr1::tuple fails to compile in C++11 when defining BOOST_FUSION_DONT_USE_PREPROCESSED_FILES https://svn.boost.org/trac10/ticket/7914 <p> Test code: </p> <pre class="wiki">#include &lt;boost/tr1/tuple.hpp&gt; #include &lt;boost/tr1/functional.hpp&gt; int a, b; std::tr1::tuple&lt;int&amp;, int&amp;&gt; get() { return std::tr1::tuple&lt;int&amp;, int&amp;&gt;(std::tr1::ref(a), std::tr1::ref(b)); } int main() { std::tr1::tuple&lt;int&amp;, int&amp;&gt; t = get(); return 0; } </pre><p> It fails to compile in C++11 mode and when BOOST_FUSION_DONT_USE_PREPROCESSED_FILES is defined. Same code compiles fine with Boost 1.48 and 1.49 </p> <pre class="wiki">$ g++ --std=c++11 -DBOOST_FUSION_DONT_USE_PREPROCESSED_FILES test.cc -I /usr/local/boost/boost_1_53_beta/include/ In file included from /usr/local/boost/boost_1_53_beta/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:57:0, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/vector10.hpp:87, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/vector_fwd.hpp:14, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/vector.hpp:10, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/tuple/tuple.hpp:11, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/tuple.hpp:10, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/include/tuple.hpp:10, from /usr/local/boost/boost_1_53_beta/include/boost/tr1/tuple.hpp:58, from test.cc:1: /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/detail/vector_n.hpp: In instantiation of ‘struct boost::fusion::vector_data2&lt;int&amp;, int&amp;&gt;’: /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/detail/vector_n.hpp:103:1: required from ‘struct boost::fusion::vector2&lt;int&amp;, int&amp;&gt;’ /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/vector.hpp:92:42: required from ‘struct boost::fusion::vector&lt;int&amp;, int&amp;, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt;’ /usr/local/boost/boost_1_53_beta/include/boost/fusion/tuple/tuple.hpp:44:12: required from ‘struct boost::fusion::tuple&lt;int&amp;, int&amp;&gt;’ test.cc:6:33: required from here /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/detail/vector_n.hpp:57:1: error: ‘boost::fusion::vector_data2&lt;T0, T1&gt;::vector_data2(typename boost::fusion::detail::call_param&lt;Car&gt;::type, typename boost::fusion::detail::call_param&lt;Cdr&gt;::type) [with T0 = int&amp;; T1 = int&amp;; typename boost::fusion::detail::call_param&lt;Car&gt;::type = int&amp;; typename boost::fusion::detail::call_param&lt;Cdr&gt;::type = int&amp;]’ cannot be overloaded /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/detail/vector_n.hpp:53:1: error: with ‘boost::fusion::vector_data2&lt;T0, T1&gt;::vector_data2(T0&amp;&amp;, T1&amp;&amp;) [with T0 = int&amp;; T1 = int&amp;]’ /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/detail/vector_n.hpp: In instantiation of ‘struct boost::fusion::vector2&lt;int&amp;, int&amp;&gt;’: /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/vector.hpp:92:42: required from ‘struct boost::fusion::vector&lt;int&amp;, int&amp;, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt;’ /usr/local/boost/boost_1_53_beta/include/boost/fusion/tuple/tuple.hpp:44:12: required from ‘struct boost::fusion::tuple&lt;int&amp;, int&amp;&gt;’ test.cc:6:33: required from here /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/detail/vector_n.hpp:130:1: error: ‘boost::fusion::vector2&lt;T0, T1&gt;::vector2(T0&amp;&amp;, T1&amp;&amp;) [with T0 = int&amp;; T1 = int&amp;]’ cannot be overloaded /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/detail/vector_n.hpp:121:1: error: with ‘boost::fusion::vector2&lt;T0, T1&gt;::vector2(typename boost::fusion::detail::call_param&lt;Car&gt;::type, typename boost::fusion::detail::call_param&lt;Cdr&gt;::type) [with T0 = int&amp;; T1 = int&amp;; typename boost::fusion::detail::call_param&lt;Car&gt;::type = int&amp;; typename boost::fusion::detail::call_param&lt;Cdr&gt;::type = int&amp;]’ In file included from /usr/local/boost/boost_1_53_beta/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:52:0, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp:20, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/vector.hpp:125, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/tuple/tuple.hpp:11, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/tuple.hpp:10, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/include/tuple.hpp:10, from /usr/local/boost/boost_1_53_beta/include/boost/tr1/tuple.hpp:58, from test.cc:1: /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/vector.hpp: In instantiation of ‘struct boost::fusion::vector&lt;int&amp;, int&amp;, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt;’: /usr/local/boost/boost_1_53_beta/include/boost/fusion/tuple/tuple.hpp:44:12: required from ‘struct boost::fusion::tuple&lt;int&amp;, int&amp;&gt;’ test.cc:6:33: required from here /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp:44:5: error: ‘boost::fusion::vector&lt;T0, T1, T2, T3, T4, T5, T6, T7, T8, T9&gt;::vector(T0&amp;&amp;) [with T0 = int&amp;; T1 = int&amp;; T2 = boost::fusion::void_; T3 = boost::fusion::void_; T4 = boost::fusion::void_; T5 = boost::fusion::void_; T6 = boost::fusion::void_; T7 = boost::fusion::void_; T8 = boost::fusion::void_; T9 = boost::fusion::void_]’ cannot be overloaded /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp:36:5: error: with ‘boost::fusion::vector&lt;T0, T1, T2, T3, T4, T5, T6, T7, T8, T9&gt;::vector(typename boost::fusion::detail::call_param&lt;T0&gt;::type) [with T0 = int&amp;; T1 = int&amp;; T2 = boost::fusion::void_; T3 = boost::fusion::void_; T4 = boost::fusion::void_; T5 = boost::fusion::void_; T6 = boost::fusion::void_; T7 = boost::fusion::void_; T8 = boost::fusion::void_; T9 = boost::fusion::void_; typename boost::fusion::detail::call_param&lt;T0&gt;::type = int&amp;]’ In file included from /usr/local/boost/boost_1_53_beta/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:57:0, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp:20, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/vector.hpp:125, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/tuple/tuple.hpp:11, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/tuple.hpp:10, from /usr/local/boost/boost_1_53_beta/include/boost/fusion/include/tuple.hpp:10, from /usr/local/boost/boost_1_53_beta/include/boost/tr1/tuple.hpp:58, from test.cc:1: /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp:44:5: error: ‘boost::fusion::vector&lt;T0, T1, T2, T3, T4, T5, T6, T7, T8, T9&gt;::vector(T0&amp;&amp;, T1&amp;&amp;) [with T0 = int&amp;; T1 = int&amp;; T2 = boost::fusion::void_; T3 = boost::fusion::void_; T4 = boost::fusion::void_; T5 = boost::fusion::void_; T6 = boost::fusion::void_; T7 = boost::fusion::void_; T8 = boost::fusion::void_; T9 = boost::fusion::void_]’ cannot be overloaded /usr/local/boost/boost_1_53_beta/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp:36:5: error: with ‘boost::fusion::vector&lt;T0, T1, T2, T3, T4, T5, T6, T7, T8, T9&gt;::vector(typename boost::fusion::detail::call_param&lt;T0&gt;::type, typename boost::fusion::detail::call_param&lt;T1&gt;::type) [with T0 = int&amp;; T1 = int&amp;; T2 = boost::fusion::void_; T3 = boost::fusion::void_; T4 = boost::fusion::void_; T5 = boost::fusion::void_; T6 = boost::fusion::void_; T7 = boost::fusion::void_; T8 = boost::fusion::void_; T9 = boost::fusion::void_; typename boost::fusion::detail::call_param&lt;T0&gt;::type = int&amp;; typename boost::fusion::detail::call_param&lt;T1&gt;::type = int&amp;]’ </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7914 Trac 1.4.3 ipapadop@… Mon, 21 Jan 2013 23:44:04 GMT version changed https://svn.boost.org/trac10/ticket/7914#comment:1 https://svn.boost.org/trac10/ticket/7914#comment:1 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.52.0</span> → <span class="trac-field-new">Boost 1.53.0</span> </li> </ul> Ticket Joel de Guzman Sun, 27 Jan 2013 07:17:49 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7914#comment:2 https://svn.boost.org/trac10/ticket/7914#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed in trunk </p> Ticket