// random number generation -*- C++ -*-
-// Copyright (C) 2009-2013 Free Software Foundation, Inc.
+// Copyright (C) 2009-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
template<typename _Engine, typename _DInputType>
struct _Adaptor
{
+ static_assert(std::is_floating_point<_DInputType>::value,
+ "template argument not a floating point type");
public:
_Adaptor(_Engine& __g)
*
* The size of the state is @f$r@f$
* and the maximum period of the generator is @f$(m^r - m^s - 1)@f$.
- *
- * @var _M_x The state of the generator. This is a ring buffer.
- * @var _M_carry The carry.
- * @var _M_p Current index of x(i - r).
*/
template<typename _UIntType, size_t __w, size_t __s, size_t __r>
class subtract_with_carry_engine
template<typename _UIntType1, size_t __w1, size_t __s1, size_t __r1,
typename _CharT, typename _Traits>
friend std::basic_ostream<_CharT, _Traits>&
- operator<<(std::basic_ostream<_CharT, _Traits>&,
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
const std::subtract_with_carry_engine<_UIntType1, __w1,
- __s1, __r1>&);
+ __s1, __r1>& __x);
/**
* @brief Extracts the current state of a % subtract_with_carry_engine
template<typename _UIntType1, size_t __w1, size_t __s1, size_t __r1,
typename _CharT, typename _Traits>
friend std::basic_istream<_CharT, _Traits>&
- operator>>(std::basic_istream<_CharT, _Traits>&,
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
std::subtract_with_carry_engine<_UIntType1, __w1,
- __s1, __r1>&);
+ __s1, __r1>& __x);
private:
+ /// The state of the generator. This is a ring buffer.
_UIntType _M_x[long_lag];
- _UIntType _M_carry;
- size_t _M_p;
+ _UIntType _M_carry; ///< The carry
+ size_t _M_p; ///< Current index of x(i - r).
};
/**