diff --git a/include/random b/include/random index 5a74f639..6bbde221 100644 --- a/include/random +++ b/include/random @@ -5938,6 +5938,7 @@ public: template param_type(size_t __nw, result_type __xmin, result_type __xmax, _UnaryOperation __fw); + param_type & operator=(const param_type& __rhs); _LIBCPP_INLINE_VISIBILITY vector intervals() const {return __b_;} @@ -6047,6 +6048,23 @@ public: piecewise_constant_distribution<_RT>& __x); }; +template +typename piecewise_constant_distribution<_RealType>::param_type & +piecewise_constant_distribution<_RealType>::param_type::operator= + (const param_type& __rhs) +{ +// These can throw + __b_.reserve (__rhs.__b_.size ()); + __densities_.reserve(__rhs.__densities_.size()); + __areas_.reserve (__rhs.__areas_.size()); + +// These can not throw + __b_ = __rhs.__b_; + __densities_ = __rhs.__densities_; + __areas_ = __rhs.__areas_; + return *this; +} + template void piecewise_constant_distribution<_RealType>::param_type::__init() @@ -6239,7 +6257,8 @@ public: template param_type(size_t __nw, result_type __xmin, result_type __xmax, _UnaryOperation __fw); - + param_type & operator=(const param_type& __rhs); + _LIBCPP_INLINE_VISIBILITY vector intervals() const {return __b_;} _LIBCPP_INLINE_VISIBILITY @@ -6348,6 +6367,24 @@ public: piecewise_linear_distribution<_RT>& __x); }; +template +typename piecewise_linear_distribution<_RealType>::param_type & +piecewise_linear_distribution<_RealType>::param_type::operator= + (const param_type& __rhs) +{ +// These can throw + __b_.reserve (__rhs.__b_.size ()); + __densities_.reserve(__rhs.__densities_.size()); + __areas_.reserve (__rhs.__areas_.size()); + +// These can not throw + __b_ = __rhs.__b_; + __densities_ = __rhs.__densities_; + __areas_ = __rhs.__areas_; + return *this; +} + + template void piecewise_linear_distribution<_RealType>::param_type::__init()