uniform_int Class
產生一致的整數散發。保留為 TR1 相容性。請改用 uniform_int_distribution Class。
template<class IntType = int>
class uniform_int {
public:
typedef IntType input_type;
typedef IntType result_type;
explicit uniform_int(result_type min0 = 0, result_type max0 = 9);
result_type min() const;
result_type max() const;
void reset();
template<class Engine>
result_type operator()(Engine& eng);
template<class Engine>
result_type operator()(Engine& eng, result_type n);
private:
result_type stored_min; // exposition only
result_type stored_max; // exposition only
};
參數
- IntType
整數結果型別。
備註
樣板類別描述會造成使用者指定的整數類資料型別的值與統一散發的散發。
需求
標題: <random>
命名空間: std