[Boost-bugs] [Boost C++ Libraries] #1068: Mersenne twister disables streaming for Visual C++

Subject: [Boost-bugs] [Boost C++ Libraries] #1068: Mersenne twister disables streaming for Visual C++
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-06-27 19:52:05


#1068: Mersenne twister disables streaming for Visual C++
---------------------------------+------------------------------------------
 Reporter: s.somani_at_[hidden] | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: random | Version:
 Severity: Problem | Keywords:
---------------------------------+------------------------------------------
 boost/mersenne_twister.hpp disables the streamable concept because boost
 config machinery says that vc 7.1/8 cannot handle member template friends.
 This appears not to be the case.

 To work around it, I do the following:

 // This hack is necessary because boost thinks that Visual C++ still
 // cannot handle member function templates
 // It is needed to make mersenne_twister streamable
 #include <boost/config.hpp>
 #if defined(BOOST_MSVC) && defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
 # undef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
 # define FINCAD_BOOST_RNG_HACK
 #endif

 #include <boost/random/mersenne_twister.hpp>

 #ifdef FINCAD_BOOST_RNG_HACK
 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
 # undef FINCAD_BOOST_RNG_HACK
 #endif

 I don't know how you would fix it for the twister. It really sounds like a
 config machinery issue but it affects the mersenne twister code
 negatively.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1068>
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:49:55 UTC