aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2012-09-05 12:41:17 +0000
committerUlrich Drepper <drepper@gcc.gnu.org>2012-09-05 12:41:17 +0000
commitff99de9860acf5e27c166b39b27ae7e0343a0ad3 (patch)
treeabe8021ed92eb417189041229c57426c14a58496 /libstdc++-v3
parent22854930b945f09487ca7947326d741ff6328377 (diff)
downloadgcc-ff99de9860acf5e27c166b39b27ae7e0343a0ad3.zip
gcc-ff99de9860acf5e27c166b39b27ae7e0343a0ad3.tar.gz
gcc-ff99de9860acf5e27c166b39b27ae7e0343a0ad3.tar.bz2
* include/ext/random.tcc (__gnu_cxx:normal_mv_distribution<>)
(operator()): Use __generate() function of _M_nd. From-SVN: r190975
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog3
-rw-r--r--libstdc++-v3/include/ext/random.tcc3
2 files changed, 4 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 15d8485..b7fb795 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,8 @@
2012-09-05 Ulrich Drepper <drepper@gmail.com>
+ * include/ext/random.tcc (__gnu_cxx:normal_mv_distribution<>)
+ (operator()): Use __generate() function of _M_nd.
+
* include/ext/random: Add __gnu_cxx:normal_mv_distribution<> class.
* include/ext/random.tccAdd out-of-line functions for
__gnu_cxx::normal_mv_distribution<>.
diff --git a/libstdc++-v3/include/ext/random.tcc b/libstdc++-v3/include/ext/random.tcc
index 0fa006a..988dc22 100644
--- a/libstdc++-v3/include/ext/random.tcc
+++ b/libstdc++-v3/include/ext/random.tcc
@@ -653,8 +653,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
result_type __ret;
- for (size_t __i = 0; __i < _Dimen; ++__i)
- __ret[__i] = _M_nd(__urng);
+ _M_nd.__generate(__ret.begin(), __ret.end(), __urng);
auto __t_it = __param._M_t.crbegin();
for (size_t __i = _Dimen; __i > 0; --__i)