Boost C++ Libraries: Ticket #3684: tuple not really a synonym for vector? https://svn.boost.org/trac10/ticket/3684 <p> I believe the enclosed patch should still allow the zip_iterator test to compile if “tuple is basically a synonym for vector” as claimed by <a href="http://www.boost.org/doc/libs/1_41_0/libs/fusion/doc/html/fusion/tuple/class_template_tuple.html">http://www.boost.org/doc/libs/1_41_0/libs/fusion/doc/html/fusion/tuple/class_template_tuple.html</a> </p> <p> Although, the word “basically” basically gives you permission to make it not a synonym in any ways you choose. You should either drop that word or drop the whole claim. :-) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3684 Trac 1.4.3 Dave Abrahams Fri, 27 Nov 2009 17:08:59 GMT attachment set https://svn.boost.org/trac10/ticket/3684 https://svn.boost.org/trac10/ticket/3684 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">zip_iterator.patch</span> </li> </ul> Ticket Joel de Guzman Fri, 27 Nov 2009 19:45:57 GMT <link>https://svn.boost.org/trac10/ticket/3684#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3684#comment:1</guid> <description> <p> The docs read as: "Currently tuple is basically a synonym for vector, although this may be changed in future releases of fusion. " </p> <p> That should be understood as "Currently fusion::tuple is basically a synonym for fusion::vector, although this may be changed in future releases of fusion. " </p> <p> I believe this claim holds. You can use fusion::tuple and fusion::vector interchangeably. The claim does not imply that boost::tuple is a synonym for fusion::vector as your patch requires. I tried your code and the compiler barfs when it gets to the point where it expects *invalid* expressions like Tuple::head_type. If the code adheres to only the API of TR1::tuple and/or fusion::vector, then all is well. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Dave Abrahams</dc:creator> <pubDate>Sat, 28 Nov 2009 04:38:02 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3684#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3684#comment:2</guid> <description> <p> One of us is very confused. The errors I saw had to do with not being able to convert vector2&lt;int, double const&gt; to tuple&lt;int&amp;, double const&amp;&gt;. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Sat, 28 Nov 2009 08:40:26 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3684#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3684#comment:3</guid> <description> <p> I am getting zip_iterator.hpp(118) : error C2039: 'head_type' : is not a member of 'boost::fusion::tuple&lt;T0,T1&gt;'. Testing SVN trunk. What am I missing? Should I be testing release branch instead? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 10 Mar 2010 21:31:53 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3684#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3684#comment:4</guid> <description> <p> I'm getting the same error as Joel with both the trunk and release branches as of revision 60449. </p> <pre class="wiki">gcc.compile.c++ ..\..\..\bin.v2\libs\iterator\test\zip_iterator_test.test\gcc-mingw-4.4.1\debug\zip_iterator_test.o In file included from zip_iterator_test.cpp:43: ..\..\../boost/iterator/zip_iterator.hpp: In instantiation of 'boost::detail::tuple_impl_specific::tuple_meta_transform_impl&lt;boost::fusion::tuple&lt;std::_Rb_tree_const_iterator&lt;int&gt;, __gnu_cxx::__normal_iterator&lt;double*, std::vector&lt;double, std::allocator&lt;double&gt; &gt; &gt;, 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;, boost::detail::iterator_reference&lt;mpl_::arg&lt;1&gt; &gt; &gt;': ..\..\../boost/mpl/eval_if.hpp:38: instantiated from 'boost::mpl::eval_if&lt;boost::is_same&lt;boost::fusion::tuple&lt;std::_Rb_tree_const_iterator&lt;int&gt;, __gnu_cxx::__normal_iterator&lt;double*, std::vector&lt;double, std::allocator&lt;double&gt; &gt; &gt;, 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;, boost::tuples::null_type&gt;, boost::mpl::identity&lt;boost::tuples::null_type&gt;, boost::detail::tuple_impl_specific::tuple_meta_transform_impl&lt;boost::fusion::tuple&lt;std::_Rb_tree_const_iterator&lt;int&gt;, __gnu_cxx::__normal_iterator&lt;double*, std::vector&lt;double, std::allocator&lt;double&gt; &gt; &gt;, 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;, boost::detail::iterator_reference&lt;mpl_::arg&lt;1&gt; &gt; &gt; &gt;' ..\..\../boost/iterator/zip_iterator.hpp:134: instantiated from 'boost::detail::tuple_impl_specific::tuple_meta_transform&lt;boost::fusion::tuple&lt;std::_Rb_tree_const_iterator&lt;int&gt;, __gnu_cxx::__normal_iterator&lt;double*, std::vector&lt;double, std::allocator&lt;double&gt; &gt; &gt;, 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;, boost::detail::iterator_reference&lt;mpl_::arg&lt;1&gt; &gt; &gt;' ..\..\../boost/iterator/zip_iterator.hpp:349: instantiated from 'boost::detail::tuple_of_references&lt;boost::fusion::tuple&lt;std::_Rb_tree_const_iterator&lt;int&gt;, __gnu_cxx::__normal_iterator&lt;double*, std::vector&lt;double, std::allocator&lt;double&gt; &gt; &gt;, 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; &gt;' ..\..\../boost/iterator/zip_iterator.hpp:415: instantiated from 'boost::detail::zip_iterator_base&lt;boost::fusion::tuple&lt;std::_Rb_tree_const_iterator&lt;int&gt;, __gnu_cxx::__normal_iterator&lt;double*, std::vector&lt;double, std::allocator&lt;double&gt; &gt; &gt;, 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; &gt;' ..\..\../boost/iterator/zip_iterator.hpp:458: instantiated from 'boost::zip_iterator&lt;boost::fusion::tuple&lt;std::_Rb_tree_const_iterator&lt;int&gt;, __gnu_cxx::__normal_iterator&lt;double*, std::vector&lt;double, std::allocator&lt;double&gt; &gt; &gt;, 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; &gt;' zip_iterator_test.cpp:113: instantiated from here ..\..\../boost/iterator/zip_iterator.hpp:124: error: no type named 'head_type' in 'struct boost::fusion::tuple&lt;std::_Rb_tree_const_iterator&lt;int&gt;, __gnu_cxx::__normal_iterator&lt;double*, std::vector&lt;double, std::allocator&lt;double&gt; &gt; &gt;, 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;' </pre><p> Dave, unless you can provide more details, I'm going to close this. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Wed, 10 Mar 2010 21:33:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3684#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3684#comment:5</guid> <description> <p> The last comment was from me, BTW. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Sun, 06 Jun 2010 23:10:53 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3684#comment:6 https://svn.boost.org/trac10/ticket/3684#comment:6 <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">invalid</span> </li> </ul> Ticket Dave Abrahams Mon, 07 Jun 2010 14:23:37 GMT <link>https://svn.boost.org/trac10/ticket/3684#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3684#comment:7</guid> <description> <p> I think I understood this to mean that boost::tuple was a synonym for fusion::vector. What is required in order to get zip_iterator to work with fusion tuples and boost tuples? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Mon, 07 Jun 2010 23:44:41 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3684#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3684#comment:8</guid> <description> <p> Well, either just stick to std::tuple interface or if that is too limiting, use fusion::vector. I'll see if I can get a crack at it. </p> </description> <category>Ticket</category> </item> </channel> </rss>