https://svn.boost.org/trac/boost/ticket/7990 (Copy constructor for transform_width has an initialization order reversal) still isn't fixed?

/home/shane.turner/Workbench/boost-1.55.0/include/3rdParty/boost/archive/iterators/transform_width.hpp: In copy constructor ‘boost::archive::iterators::transform_width<Base, BitsOut, BitsIn, CharType>::transform_width(const boost::archive::iterators::transform_width<Base, BitsOut, BitsIn, CharType>&) [with Base = boost::archive::iterators::binary_from_base64<const char*>, int BitsOut = 8, int BitsIn = 6, CharType = unsigned char, boost::archive::iterators::transform_width<Base, BitsOut, BitsIn, CharType> = boost::archive::iterators::transform_width<boost::archive::iterators::binary_from_base64<const char*>, 8, 6, unsigned char>]’:
/home/shane.turner/Workbench/boost-1.55.0/include/npString/Base64.hh:33:81:   instantiated from here
/home/shane.turner/Workbench/boost-1.55.0/include/3rdParty/boost/archive/iterators/transform_width.hpp:104:18: error: ‘boost::archive::iterators::transform_width<boost::archive::iterators::binary_from_base64<const char*>, 8, 6, unsigned char>::m_remaining_bits’ will be initialized after [-Werror=reorder]
/home/shane.turner/Workbench/boost-1.55.0/include/3rdParty/boost/archive/iterators/transform_width.hpp:101:21: error:   ‘boost::archive::iterators::transform_width<boost::archive::iterators::binary_from_base64<const char*>, 8, 6, unsigned char>::base_value_type boost::archive::iterators::transform_width<boost::archive::iterators::binary_from_base64<const char*>, 8, 6, unsigned char>::m_buffer_in’ [-Werror=reorder]
/home/shane.turner/Workbench/boost-1.55.0/include/3rdParty/boost/archive/iterators/transform_width.hpp:119:5: error:   when initialized here [-Werror=reorder]

It's fixed in the trunk code at http://svn.boost.org/svn/boost/trunk/boost/archive/iterators/transform_width.hpp

c$ svn log -r 86155 http://svn.boost.org/svn/boost/trunk/boost/archive/iterators/transform_width.hpp
------------------------------------------------------------------------
r86155 | ramey | 2013-10-03 21:26:49 -0300 (Thu, 03 Oct 2013) | 1 line

fixed memory leak on load_object_ptr and other changes
------------------------------------------------------------------------

$ svn diff -c 86155 http://svn.boost.org/svn/boost/trunk/boost/archive/iterators/transform_width.hpp
Index: transform_width.hpp
===================================================================
--- transform_width.hpp (revision 86154)
+++ transform_width.hpp (revision 86155)
@@ -24,12 +24,15 @@
 // character and 8 bit bytes. Lowest common multiple is 24 => 4 6 bit characters
 // or 3 8 bit characters

+
 #include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME & PTFO
 #include <boost/serialization/pfto.hpp>

 #include <boost/iterator/iterator_adaptor.hpp>
 #include <boost/iterator/iterator_traits.hpp>

+#include <algorithm> // std::min
+
 namespace boost {
 namespace archive {
 namespace iterators {
@@ -112,6 +115,10 @@
     transform_width(BOOST_PFTO_WRAPPER(T) start) :
         super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))),
         m_buffer_out_full(false),
+        // To disable GCC warning, but not truly necessary
+           //(m_buffer_in will be initialized later before being
+           //used because m_remaining_bits == 0)
+        m_buffer_in(0),
         m_remaining_bits(0),
         m_end_of_sequence(false)
     {}
@@ -119,8 +126,8 @@
     transform_width(const transform_width & rhs) :
         super_t(rhs.base_reference()),
         m_buffer_out_full(rhs.m_buffer_out_full),
+        m_buffer_in(rhs.m_buffer_in),
         m_remaining_bits(rhs.m_remaining_bits),
-        m_buffer_in(rhs.m_buffer_in),
         m_end_of_sequence(false)
     {}
 };

Shane Turner

On 08/10/2013 11:11 AM, Marshall Clow wrote:
Boost release 1.55.0 beta 1 is now available from SourceForge

See http://sourceforge.net/projects/boost/files/boost/1.55.0.beta.1/

This release contains 1 new library:

	* Predef:   This library defines a set of compiler, architecture, operating system, library, and other version numbers from the information it can gather of C, C++, Objective C, and Objective C++ predefined macros or those defined in generally available headers, from Rene Rivera.

For details of what's in the release, see http://www.boost.org/users/history/version_1_55_0.html. 
Note that the links to files on this web page are for the final release - use the SourceForge link above to get the beta files.

Please download the beta, give it a try, and report any problems you encounter.

Thanks,

-- The Boost Release Team

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users


--
 



Shane Turner

Senior Software Developer
phone +1 (902) 406–8375  x1008
email Shane.Turner@NewPace.ca
aim/msn Shane.Turner@NewPace.ca
skype saturnjct