Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7550: Vector of variate generators cannot be populated
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-23 17:19:55
#7550: Vector of variate generators cannot be populated
--------------------------------------+-------------------------------------
Reporter: fenix.citizen@⦠| Owner: no-maintainer
Type: Bugs | Status: new
Milestone: To Be Determined | Component: random
Version: Boost 1.48.0 | Severity: Problem
Resolution: | Keywords: vector, STL, variate generator
--------------------------------------+-------------------------------------
Comment (by anonymous):
Thank you for pointing it out. I should have read the variate_generator
template description more carefully.
Replying to [comment:1 steven_watanabe]:
> The problem is that a variate_generator containing a reference is not
Assignable. In C++03, the element type of a container must be Assignable
(23.1). Use a pointer instead:
>
> {{{
> variate_generator<mt19937*, uniform_real<> >
> }}}
>
> Note: The requirement of assignment is relaxed in C++11.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7550#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC