[Boost-bugs] [Boost C++ Libraries] #12469: BOOST_MPL_PRINT_HPP generates error: negative integral constant converted to unsigned type

Subject: [Boost-bugs] [Boost C++ Libraries] #12469: BOOST_MPL_PRINT_HPP generates error: negative integral constant converted to unsigned type
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-09-20 14:17:27


#12469: BOOST_MPL_PRINT_HPP generates error: negative integral constant converted
to unsigned type
------------------------------+---------------------------
 Reporter: anonymous | Owner: ramey
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
  Version: Boost 1.61.0 | Severity: Showstopper
 Keywords: |
------------------------------+---------------------------
 Hi, serialization in win32 generates compile error in VS2015. The error
 is:
 c:\program files\boost\boost_1_61_0\boost\mpl\print.hpp(52): error C4308:
 negative integral constant converted to unsigned type

 {{{
 #elif defined(BOOST_MSVC)
     enum { n = sizeof(T) + -1 };
 #elif defined(__MWERKS__)
 }}}

 And ultimately this was triggered by:


 {{{
 private:
         // the range of the output hashed variable
         size_t mWidth;
         size_t mPrime;
         size_t mKindependent;

         std::shared_ptr<std::vector<size_t> > mpCoefficients;

         friend class boost::serialization::access;

         template<class Archive>
         void serialize(Archive & ar, const unsigned int version)
         {
                 ar & mPrime ; ar & mKindependent ; ar & mpCoefficients ;
 ar & mWidth;
         }
 }}}

 All works in 64 bit mode.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12469>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC