diff options
author | Ulrich Drepper <drepper@gmail.com> | 2014-07-13 16:43:01 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@gcc.gnu.org> | 2014-07-13 16:43:01 +0000 |
commit | 5c8efaf2fb28b94a6c9201abf88fb5a0c86ebfe6 (patch) | |
tree | 9ad47c9a399cd40e142a02269c6a927d66a4ed29 | |
parent | 9c2c4e622cfb5d3ea800d094bc3e89ddfd7a3374 (diff) | |
download | gcc-5c8efaf2fb28b94a6c9201abf88fb5a0c86ebfe6.zip gcc-5c8efaf2fb28b94a6c9201abf88fb5a0c86ebfe6.tar.gz gcc-5c8efaf2fb28b94a6c9201abf88fb5a0c86ebfe6.tar.bz2 |
random.tcc: Fix operator>> and operator<< for uniform_on_sphere_distribution.
* include/ext/random.tcc: Fix operator>> and operator<< for
uniform_on_sphere_distribution.
From-SVN: r212496
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/random.tcc | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4b798c0..d0dea3d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2014-07-13 Ulrich Drepper <drepper@gmail.com> + + * include/ext/random.tcc: Fix operator>> and operator<< for + uniform_on_sphere_distribution. + 2014-07-12 Ulrich Drepper <drepper@gmail.com> * 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 c836b21..eda5d9a 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<std::size_t _Dimen, typename _RealType, typename _CharT, @@ -1595,7 +1595,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _RealType>& __x) { // The distribution has no state, nothing to restore. - return __is; + return __is >> _M_n; } _GLIBCXX_END_NAMESPACE_VERSION |