mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-12 14:54:10 +00:00
sprout/random/unique_seed.hpp 更新
at() メンバ関数を constexpr に変更
This commit is contained in:
parent
72d16afcdc
commit
9823888049
6 changed files with 55 additions and 27 deletions
|
@ -130,12 +130,16 @@ namespace sprout {
|
|||
return elems[i];
|
||||
}
|
||||
reference at(size_type i) {
|
||||
rangecheck(i);
|
||||
return elems[i];
|
||||
return i < size()
|
||||
? elems[i]
|
||||
: (throw std::out_of_range("array<>: index out of range"), elems[i])
|
||||
;
|
||||
}
|
||||
const_reference at(size_type i) const {
|
||||
rangecheck(i);
|
||||
return elems[i];
|
||||
SPROUT_CONSTEXPR const_reference at(size_type i) const {
|
||||
return i < size()
|
||||
? elems[i]
|
||||
: (throw std::out_of_range("array<>: index out of range"), elems[i])
|
||||
;
|
||||
}
|
||||
reference front() {
|
||||
return elems[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue