diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4b798c0f125..d0dea3d87a3 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2014-07-13 Ulrich Drepper + + * include/ext/random.tcc: Fix operator>> and operator<< for + uniform_on_sphere_distribution. + 2014-07-12 Ulrich Drepper * include/ext/random: Add uniform_on_sphere_distribution definition. diff --git a/libstdc++-v3/include/ext/random.tcc b/libstdc++-v3/include/ext/random.tcc index c836b211cae..eda5d9aa009 100644 --- a/libstdc++-v3/include/ext/random.tcc +++ b/libstdc++-v3/include/ext/random.tcc @@ -1584,7 +1584,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _RealType>& __x) { // The distribution has no state, nothing to save. - return __os; + return __os << _M_n; } template& __x) { // The distribution has no state, nothing to restore. - return __is; + return __is >> _M_n; } _GLIBCXX_END_NAMESPACE_VERSION