Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2003-12-22 08:23:00


> The following patch gets the random lib compiling with gcc2.95.3, it also
> fixes regressions with the graph lib tests (which depend upon the random
> lib),

Remarkably there was a missing # in that patch that cygwin didn't pick up
on, modified patch below, now tested on Red Hat Linux, as well as cygwin.

John.

Index: pass_through_engine.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/random/detail/pass_through_engine.hpp,v
retrieving revision 1.2
diff -u -b -r1.2 pass_through_engine.hpp
--- pass_through_engine.hpp 11 Jul 2003 22:21:28 -0000 1.2
+++ pass_through_engine.hpp 22 Dec 2003 12:29:51 -0000
@@ -53,6 +53,8 @@
   UniformRandomNumberGenerator _rng;
 };

+#ifndef BOOST_NO_STD_LOCALE
+
 template<class UniformRandomNumberGenerator, class CharT, class Traits>
 std::basic_ostream<CharT,Traits>&
 operator<<(
@@ -72,6 +74,26 @@
 {
     return is >> ud.base();
 }
+
+#else // no new streams
+
+template<class UniformRandomNumberGenerator>
+inline std::ostream&
+operator<<(std::ostream& os,
+ const pass_through_engine<UniformRandomNumberGenerator>& ud)
+{
+ return os << ud.base();
+}
+
+template<class UniformRandomNumberGenerator>
+inline std::istream&
+operator>>(std::istream& is,
+ const pass_through_engine<UniformRandomNumberGenerator>& ud)
+{
+ return is >> ud.base();
+}
+
+#endif

 } // namespace detail
 } // namespace random


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk