[Boost.Random] C2825 in pass_through_engine.hpp when compiling on VS2005

Hi everyone, hope someone could help me... I'm using Boost Libraries 1.34.0 (actually Boost.Random only) in a VS2005 VC++ project. I've read the behaviour of these libraries on this platform at http://tinyurl.com/38pbp2 and all results on machines using this compiler are marked "pass", so it should work... But not for me, and I cannot really find why. Here is the code (more or less), cut'n'pasted from all around the project //begin code #include <boost/random.hpp> //commenting this line is uninfluential #include <boost/random/variate_generator.hpp> #include <boost/random/mersenne_twister.hpp> #include <boost/random/lagged_fibonacci.hpp> #include <boost/random/uniform_int.hpp> #include <boost/random/normal_distribution.hpp> boost::mt19937 Engine_Int; boost::lagged_fibonacci19937 Engine_Double; boost::uniform_int< > Uniform( 0, RAND_MAX ); boost::variate_generator< boost::mt19937&, boost::uniform_int< > > MyRand( Engine_Int, Uniform ); boost::normal_distribution< > Gaussian( 20, sqrt( (double) 20) ); boost::variate_generator< boost::lagged_fibonacci19937&, boost::normal_distribution< > > MyGaussianRand( Engine_Double, Gaussian ); unsigned SeedGenerator( unsigned uSeed ) { Engine_Int.seed( (boost::mt19937::result_type) uSeed ); Engine_Double.seed( uSeed ); return( uSeed ); } int main( ) { //do something... return EXIT_SUCCESS } //end code Does someone have a guess? Thanks a lot Gabriele

Maybe it could be better if I let you see the error log: // Compiled with /W0 //begin log w:\boost c++ libraries 1.34.0\boost\random\detail\pass_through_engine.hpp (33) : error C2825: 'boost::random::detail::pass_through_engine::base_type': must be a class or namespace when followed by '::' with [ UniformRandomNumberGenerator=unsigned int & ] w:\boost c++ libraries 1.34.0\boost\random\uniform_01.hpp(80) : see reference to class template instantiation 'boost::random::detail::pass_through_engine' being compiled with [ UniformRandomNumberGenerator=unsigned int & ] w:\boost c++ libraries 1.34.0\boost\random\lagged_fibonacci.hpp(301) : see reference to class template instantiation 'boost::uniform_01' being compiled with [ UniformRandomNumberGenerator=ref_gen, RealType=double ] c:\documents and settings\gabriele\documenti\visual studio 2005 \projects\nanosynthetic flares - consoleapp\nanosynthetic flares - consoleapp\random_inlines.h(20) : see reference to function template instantiation 'void boost::random::lagged_fibonacci_01::seed(Generator &)' being compiled with [ RealType=double, w=48, p=19937, q=9842, Generator=unsigned int ] w:\boost c++ libraries 1.34.0\boost\random\detail\pass_through_engine.hpp (33) : error C2039: 'result_type' : is not a member of '`global namespace'' w:\boost c++ libraries 1.34.0\boost\random\detail\pass_through_engine.hpp (33) : error C2146: syntax error : missing ';' before identifier 'result_type' w:\boost c++ libraries 1.34.0\boost\random\detail\pass_through_engine.hpp (33) : error C2602: 'boost::random::detail::pass_through_engine::result_type' is not a member of a base class of 'boost::random::detail::pass_through_engine' with [ UniformRandomNumberGenerator=unsigned int & ] w:\boost c++ libraries 1.34.0 \boost\random\detail\pass_through_engine.hpp(33) : see declaration of 'boost::random::detail::pass_through_engine::result_type' with [ UniformRandomNumberGenerator=unsigned int & ] w:\boost c++ libraries 1.34.0\boost\random\detail\pass_through_engine.hpp (33) : error C2868: 'boost::random::detail::pass_through_engine::result_type' : illegal syntax for using-declaration; expected qualified-name with [ UniformRandomNumberGenerator=unsigned int & ] w:\boost c++ libraries 1.34.0\boost\random\detail\pass_through_engine.hpp (33) : error C2825: 'boost::random::detail::pass_through_engine::base_type': must be a class or namespace when followed by '::' with [ UniformRandomNumberGenerator=unsigned int & ] w:\boost c++ libraries 1.34.0\boost\random\uniform_01.hpp(80) : see reference to class template instantiation 'boost::random::detail::pass_through_engine' being compiled with [ UniformRandomNumberGenerator=unsigned int & ] w:\boost c++ libraries 1.34.0\boost\random\lagged_fibonacci.hpp(301) : see reference to class template instantiation 'boost::uniform_01' being compiled with [ UniformRandomNumberGenerator=ref_gen, RealType=double ] c:\documents and settings\gabriele\documenti\visual studio 2005 \projects\nanosynthetic flares - consoleapp\nanosynthetic flares - consoleapp\random_inlines.h(20) : see reference to function template instantiation 'void boost::random::lagged_fibonacci_01::seed(Generator &)' being compiled with [ RealType=double, w=48, p=19937, q=9842, Generator=unsigned int ] w:\boost c++ libraries 1.34.0\boost\random\detail\pass_through_engine.hpp (33) : error C2039: 'result_type' : is not a member of '`global namespace'' w:\boost c++ libraries 1.34.0\boost\random\detail\pass_through_engine.hpp (33) : error C2146: syntax error : missing ';' before identifier 'result_type' w:\boost c++ libraries 1.34.0\boost\random\detail\pass_through_engine.hpp (33) : error C2602: 'boost::random::detail::pass_through_engine::result_type' is not a member of a base class of 'boost::random::detail::pass_through_engine' with [ UniformRandomNumberGenerator=unsigned int & ] w:\boost c++ libraries 1.34.0 \boost\random\detail\pass_through_engine.hpp(33) : see declaration of 'boost::random::detail::pass_through_engine::result_type' with [ UniformRandomNumberGenerator=unsigned int & ] w:\boost c++ libraries 1.34.0\boost\random\detail\pass_through_engine.hpp (33) : error C2868: 'boost::random::detail::pass_through_engine::result_type' : illegal syntax for using-declaration; expected qualified-name with [ UniformRandomNumberGenerator=unsigned int & ] //end log Hope this could help you in helping me... Thanks, Gabriele
participants (1)
-
Gabriele Rizzo