aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)