Boost C++ Libraries: Ticket #2180: Errors on binary serialization of vector https://svn.boost.org/trac10/ticket/2180 <p> I am encountering compiler errors when trying to serialize objects stored in a vector, using boost 1.35, as well as boost svn. </p> <p> Here's a simplified test case </p> <pre class="wiki">#include &lt;fstream&gt; #include &lt;vector&gt; #include &lt;boost/archive/binary_oarchive.hpp&gt; #include &lt;boost/archive/text_oarchive.hpp&gt; #include &lt;boost/serialization/vector.hpp&gt; void test() { std::vector&lt;int&gt; vec; std::ofstream ofs("file"); // boost::archive::text_oarchive oarc(ofs); // Compiles fine under both GCC 4.0.1 and GCC 4.1 boost::archive::binary_oarchive oarc(ofs); // Compiles under GCC 4.0.1 but not GCC 4.1. Also compiles fine with boost 1.34/GCC 4.1 oarc &amp; vec; } </pre><p> Whereas serializing to a text archive works fine under both compilers, binary serialization triggers compiler errors under GCC 4.1 </p> <hr /> <pre class="wiki">/Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp: In instantiation of ‘const int boost::mpl::aux::template_arity_impl&lt;boost::archive::basic_binary_oprimitive&lt;boost::archive::binary_oarchive, char, std::char_traits&lt;char&gt; &gt;::use_array_optimization, 3&gt;::value’: /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:93: instantiated from ‘const int boost::mpl::aux::template_arity&lt;boost::archive::basic_binary_oprimitive&lt;boost::archive::binary_oarchive, char, std::char_traits&lt;char&gt; &gt;::use_array_optimization&gt;::value’ /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:98: instantiated from ‘boost::mpl::aux::template_arity&lt;boost::archive::basic_binary_oprimitive&lt;boost::archive::binary_oarchive, char, std::char_traits&lt;char&gt; &gt;::use_array_optimization&gt;’ /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/apply.hpp:48: instantiated from ‘boost::mpl::apply1&lt;boost::archive::basic_binary_oprimitive&lt;boost::archive::binary_oarchive, char, std::char_traits&lt;char&gt; &gt;::use_array_optimization, int&gt;’ /Users/kostas/develop/ext/boost/boost/archive/binary_oarchive.hpp:53: instantiated from ‘boost::serialization::use_array_optimization&lt;boost::archive::binary_oarchive&gt;::apply&lt;int&gt;’ /Users/kostas/develop/ext/boost/boost/serialization/vector.hpp:119: instantiated from ‘void boost::serialization::save(Archive&amp;, const std::vector&lt;U, Allocator&gt;&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, U = int, Allocator = std::allocator&lt;int&gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/split_free.hpp:45: instantiated from ‘static void boost::serialization::free_saver&lt;Archive, T&gt;::invoke(Archive&amp;, const T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/split_free.hpp:74: instantiated from ‘void boost::serialization::split_free(Archive&amp;, T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/vector.hpp:139: instantiated from ‘void boost::serialization::serialize(Archive&amp;, std::vector&lt;U, Allocator&gt;&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, U = int, Allocator = std::allocator&lt;int&gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&amp;, T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/archive/detail/oserializer.hpp:144: instantiated from ‘void boost::archive::detail::oserializer&lt;Archive, T&gt;::save_object_data(boost::archive::detail::basic_oarchive&amp;, const void*) const [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ test3.cpp:15: instantiated from here /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:85: error: call of overloaded ‘arity_helper(boost::mpl::aux::type_wrapper&lt;boost::archive::basic_binary_oprimitive&lt;boost::archive::binary_oarchive, char, std::char_traits&lt;char&gt; &gt;::use_array_optimization&gt;, boost::mpl::aux::arity_tag&lt;3&gt;)’ is ambiguous /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:30: note: candidates are: char (&amp; boost::mpl::aux::arity_helper(...))[1] /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:51: note: char (&amp; boost::mpl::aux::arity_helper(boost::mpl::aux::type_wrapper&lt;F&lt;T1, T2, T3&gt; &gt;, boost::mpl::aux::arity_tag&lt;3&gt;))[4] [with F = boost::archive::basic_binary_oprimitive&lt;Archive, Elem, Tr&gt;::use_array_optimization, T1 = boost::archive::binary_oarchive, T2 = char, T3 = std::char_traits&lt;char&gt;] /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:51: note: char (&amp; boost::mpl::aux::arity_helper(boost::mpl::aux::type_wrapper&lt;F&lt;T1, T2, T3&gt; &gt;, boost::mpl::aux::arity_tag&lt;3&gt;))[4] [with F = boost::archive::basic_binary_oprimitive&lt;Archive, Elem, Tr&gt;::use_array_optimization, T1 = boost::archive::binary_oarchive, T2 = char, T3 = std::char_traits&lt;char&gt;] /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp: In instantiation of ‘const int boost::mpl::aux::template_arity&lt;boost::archive::basic_binary_oprimitive&lt;boost::archive::binary_oarchive, char, std::char_traits&lt;char&gt; &gt;::use_array_optimization&gt;::value’: /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:98: instantiated from ‘boost::mpl::aux::template_arity&lt;boost::archive::basic_binary_oprimitive&lt;boost::archive::binary_oarchive, char, std::char_traits&lt;char&gt; &gt;::use_array_optimization&gt;’ /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/apply.hpp:48: instantiated from ‘boost::mpl::apply1&lt;boost::archive::basic_binary_oprimitive&lt;boost::archive::binary_oarchive, char, std::char_traits&lt;char&gt; &gt;::use_array_optimization, int&gt;’ /Users/kostas/develop/ext/boost/boost/archive/binary_oarchive.hpp:53: instantiated from ‘boost::serialization::use_array_optimization&lt;boost::archive::binary_oarchive&gt;::apply&lt;int&gt;’ /Users/kostas/develop/ext/boost/boost/serialization/vector.hpp:119: instantiated from ‘void boost::serialization::save(Archive&amp;, const std::vector&lt;U, Allocator&gt;&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, U = int, Allocator = std::allocator&lt;int&gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/split_free.hpp:45: instantiated from ‘static void boost::serialization::free_saver&lt;Archive, T&gt;::invoke(Archive&amp;, const T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/split_free.hpp:74: instantiated from ‘void boost::serialization::split_free(Archive&amp;, T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/vector.hpp:139: instantiated from ‘void boost::serialization::serialize(Archive&amp;, std::vector&lt;U, Allocator&gt;&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, U = int, Allocator = std::allocator&lt;int&gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&amp;, T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/archive/detail/oserializer.hpp:144: instantiated from ‘void boost::archive::detail::oserializer&lt;Archive, T&gt;::save_object_data(boost::archive::detail::basic_oarchive&amp;, const void*) const [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ test3.cpp:15: instantiated from here /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:93: error: ‘&lt;expression error&gt;’ is not a valid template argument for type ‘int’ because it is a non-constant expression /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp: In instantiation of ‘boost::mpl::aux::template_arity&lt;boost::archive::basic_binary_oprimitive&lt;boost::archive::binary_oarchive, char, std::char_traits&lt;char&gt; &gt;::use_array_optimization&gt;’: /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/apply.hpp:48: instantiated from ‘boost::mpl::apply1&lt;boost::archive::basic_binary_oprimitive&lt;boost::archive::binary_oarchive, char, std::char_traits&lt;char&gt; &gt;::use_array_optimization, int&gt;’ /Users/kostas/develop/ext/boost/boost/archive/binary_oarchive.hpp:53: instantiated from ‘boost::serialization::use_array_optimization&lt;boost::archive::binary_oarchive&gt;::apply&lt;int&gt;’ /Users/kostas/develop/ext/boost/boost/serialization/vector.hpp:119: instantiated from ‘void boost::serialization::save(Archive&amp;, const std::vector&lt;U, Allocator&gt;&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, U = int, Allocator = std::allocator&lt;int&gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/split_free.hpp:45: instantiated from ‘static void boost::serialization::free_saver&lt;Archive, T&gt;::invoke(Archive&amp;, const T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/split_free.hpp:74: instantiated from ‘void boost::serialization::split_free(Archive&amp;, T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/vector.hpp:139: instantiated from ‘void boost::serialization::serialize(Archive&amp;, std::vector&lt;U, Allocator&gt;&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, U = int, Allocator = std::allocator&lt;int&gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&amp;, T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/archive/detail/oserializer.hpp:144: instantiated from ‘void boost::archive::detail::oserializer&lt;Archive, T&gt;::save_object_data(boost::archive::detail::basic_oarchive&amp;, const void*) const [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ test3.cpp:15: instantiated from here /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:98: error: ‘&lt;expression error&gt;’ is not a valid template argument for type ‘int’ because it is a non-constant expression /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/apply.hpp: In instantiation of ‘boost::mpl::apply1&lt;boost::archive::basic_binary_oprimitive&lt;boost::archive::binary_oarchive, char, std::char_traits&lt;char&gt; &gt;::use_array_optimization, int&gt;’: /Users/kostas/develop/ext/boost/boost/archive/binary_oarchive.hpp:53: instantiated from ‘boost::serialization::use_array_optimization&lt;boost::archive::binary_oarchive&gt;::apply&lt;int&gt;’ /Users/kostas/develop/ext/boost/boost/serialization/vector.hpp:119: instantiated from ‘void boost::serialization::save(Archive&amp;, const std::vector&lt;U, Allocator&gt;&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, U = int, Allocator = std::allocator&lt;int&gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/split_free.hpp:45: instantiated from ‘static void boost::serialization::free_saver&lt;Archive, T&gt;::invoke(Archive&amp;, const T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/split_free.hpp:74: instantiated from ‘void boost::serialization::split_free(Archive&amp;, T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/vector.hpp:139: instantiated from ‘void boost::serialization::serialize(Archive&amp;, std::vector&lt;U, Allocator&gt;&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, U = int, Allocator = std::allocator&lt;int&gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&amp;, T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/archive/detail/oserializer.hpp:144: instantiated from ‘void boost::archive::detail::oserializer&lt;Archive, T&gt;::save_object_data(boost::archive::detail::basic_oarchive&amp;, const void*) const [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ test3.cpp:15: instantiated from here /Users/kostas/develop/ext/boost/boost/mpl/aux_/preprocessed/gcc/apply.hpp:48: error: ‘&lt;expression error&gt;’ is not a valid template argument for type ‘int’ because it is a non-constant expression /Users/kostas/develop/ext/boost/boost/archive/binary_oarchive.hpp: In instantiation of ‘boost::serialization::use_array_optimization&lt;boost::archive::binary_oarchive&gt;::apply&lt;int&gt;’: /Users/kostas/develop/ext/boost/boost/serialization/vector.hpp:119: instantiated from ‘void boost::serialization::save(Archive&amp;, const std::vector&lt;U, Allocator&gt;&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, U = int, Allocator = std::allocator&lt;int&gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/split_free.hpp:45: instantiated from ‘static void boost::serialization::free_saver&lt;Archive, T&gt;::invoke(Archive&amp;, const T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/split_free.hpp:74: instantiated from ‘void boost::serialization::split_free(Archive&amp;, T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/vector.hpp:139: instantiated from ‘void boost::serialization::serialize(Archive&amp;, std::vector&lt;U, Allocator&gt;&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, U = int, Allocator = std::allocator&lt;int&gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&amp;, T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/archive/detail/oserializer.hpp:144: instantiated from ‘void boost::archive::detail::oserializer&lt;Archive, T&gt;::save_object_data(boost::archive::detail::basic_oarchive&amp;, const void*) const [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ test3.cpp:15: instantiated from here /Users/kostas/develop/ext/boost/boost/archive/binary_oarchive.hpp:53: error: no type named ‘type’ in ‘struct boost::mpl::apply1&lt;boost::archive::basic_binary_oprimitive&lt;boost::archive::binary_oarchive, char, std::char_traits&lt;char&gt; &gt;::use_array_optimization, int&gt;’ /Users/kostas/develop/ext/boost/boost/serialization/vector.hpp: In function ‘void boost::serialization::save(Archive&amp;, const std::vector&lt;U, Allocator&gt;&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, U = int, Allocator = std::allocator&lt;int&gt;]’: /Users/kostas/develop/ext/boost/boost/serialization/split_free.hpp:45: instantiated from ‘static void boost::serialization::free_saver&lt;Archive, T&gt;::invoke(Archive&amp;, const T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/split_free.hpp:74: instantiated from ‘void boost::serialization::split_free(Archive&amp;, T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/vector.hpp:139: instantiated from ‘void boost::serialization::serialize(Archive&amp;, std::vector&lt;U, Allocator&gt;&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, U = int, Allocator = std::allocator&lt;int&gt;]’ /Users/kostas/develop/ext/boost/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&amp;, T&amp;, unsigned int) [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ /Users/kostas/develop/ext/boost/boost/archive/detail/oserializer.hpp:144: instantiated from ‘void boost::archive::detail::oserializer&lt;Archive, T&gt;::save_object_data(boost::archive::detail::basic_oarchive&amp;, const void*) const [with Archive = boost::archive::binary_oarchive, T = std::vector&lt;int, std::allocator&lt;int&gt; &gt;]’ test3.cpp:15: instantiated from here /Users/kostas/develop/ext/boost/boost/serialization/vector.hpp:119: error: no type named ‘type’ in ‘struct boost::serialization::use_array_optimization&lt;boost::archive::binary_oarchive&gt;::apply&lt;int&gt;’ </pre><hr /> <p> My compiler versions are </p> <pre class="wiki">Using built-in specs. Target: powerpc-apple-darwin9 Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --program-prefix= --host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9 Thread model: posix gcc version 4.0.1 (Apple Inc. build 5465) </pre><pre class="wiki">Using built-in specs. Target: psp Configured with: ../configure --prefix=/Users/kostas/develop/psp/pspdev --target=psp --enable-languages=c,c++ --with-newlib --enable-cxx-flags=-G0 Thread model: single gcc version 4.1.0 (PSPDEV 20060507) </pre><p> Thanks in advance </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2180 Trac 1.4.3 Robert Ramey Mon, 11 Aug 2008 21:28:01 GMT owner changed https://svn.boost.org/trac10/ticket/2180#comment:1 https://svn.boost.org/trac10/ticket/2180#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Robert Ramey</span> to <span class="trac-author">Matthias Troyer</span> </li> </ul> <p> Mathias, </p> <p> Could you take a look at this for me please? </p> <p> Robert Ramey </p> Ticket anonymous Mon, 11 Aug 2008 21:45:11 GMT <link>https://svn.boost.org/trac10/ticket/2180#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2180#comment:2</guid> <description> <p> I will have to install gcc 4.1 It works for me using gcc 4.0 and gcc 4.2 </p> </description> <category>Ticket</category> </item> <item> <author>k_karanikolas@…</author> <pubDate>Tue, 12 Aug 2008 17:48:48 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2180#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2180#comment:3</guid> <description> <p> I investigated a little bit further which version triggers the error, and it appears to be 4.1.0. </p> <p> I compiled a stock gcc-4.1.0, and the error is still there. </p> <pre class="wiki">Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../configure --prefix=/home/kostas/local/ --enable-languages=c,c++ Thread model: posix gcc version 4.1.0 </pre><p> Ubuntu's gcc-4.1.3 however, does not trigger this error </p> <pre class="wiki">Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu Thread model: posix gcc version 4.1.3 20080308 (prerelease) (Ubuntu 4.1.2-21ubuntu1) </pre><p> Unfortunately, I am using 4.1.0 not by choice, but because the community supported compiler/toolset for my target platform (PSP) is based on stock gcc-4.1.0 plus some back-end patches. I'll try to apply the patches to the latest of the 4.1 line and see if the problem is still there. At any rate I think this issue can potentially "bite" someone using 4.1.0. </p> <p> Also in the mailing list archives, (<a class="ext-link" href="http://lists.boost.org/boost-users/2008/07/38112.php"><span class="icon">​</span>http://lists.boost.org/boost-users/2008/07/38112.php</a>) I've found something that resembles the errors I'm getting. So it maybe possible to construct a workaround to what appears to be a compiler bug. </p> <p> Thanks again, </p> <p> Kostas </p> </description> <category>Ticket</category> </item> <item> <author>k_karanikolas@…</author> <pubDate>Mon, 18 Aug 2008 07:59:20 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2180#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2180#comment:4</guid> <description> <p> One more update. I was able to update my toolchain to 4.1.2 and the previously mentioned errors have gone. It appears that there is some kind of compiler bug in gcc in version 4.1.0. At any rate you may want to close this issue, but perhaps add some kind of warning in the documentation, to help people that may encounter similar problems. </p> <p> Thanks Kostas </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Matthias Troyer</dc:creator> <pubDate>Mon, 18 Aug 2008 17:45:46 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2180#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2180#comment:5</guid> <description> <p> We can turn array optimizations off for 4.1.0. That way it will still compile, however at the cost of substantially decreased performance. Would you prefer that over compiler errors due to compiler bugs? </p> </description> <category>Ticket</category> </item> <item> <author>k_karanikolas@…</author> <pubDate>Thu, 21 Aug 2008 08:00:30 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2180#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2180#comment:6</guid> <description> <p> I think it might be better to opt for compatibility rather than performance. Perhaps even controlling the inclusion of these optimizations through a #define. This way it may make it easier for people to diagnose such a problems which may exist in other compiler versions. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Matthias Troyer</dc:creator> <pubDate>Mon, 03 Aug 2009 20:55:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2180#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2180#comment:7</guid> <description> <p> The offending code has been rewritten some time ago. Can someone with access to the involved compilers please try if this is still an issue? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 05 Aug 2009 16:01:16 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2180#comment:8 https://svn.boost.org/trac10/ticket/2180#comment:8 <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> I'm closing this since I believe that this issue should not occur with the current code. </p> Ticket