1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

add optional container interface

This commit is contained in:
bolero-MURAKAMI 2016-02-25 18:48:28 +09:00
parent 088434f46a
commit 97e8cfc2c0
2577 changed files with 2743 additions and 2597 deletions

View file

@ -1,5 +1,5 @@
/*=============================================================================
Copyright (c) 2011-2015 Bolero MURAKAMI
Copyright (c) 2011-2016 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprout
Distributed under the Boost Software License, Version 1.0. (See accompanying

View file

@ -1,5 +1,5 @@
/*=============================================================================
Copyright (c) 2011-2015 Bolero MURAKAMI
Copyright (c) 2011-2016 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprout
Distributed under the Boost Software License, Version 1.0. (See accompanying

View file

@ -1,5 +1,5 @@
/*=============================================================================
Copyright (c) 2011-2015 Bolero MURAKAMI
Copyright (c) 2011-2016 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprout
Distributed under the Boost Software License, Version 1.0. (See accompanying

View file

@ -1,5 +1,5 @@
/*=============================================================================
Copyright (c) 2011-2015 Bolero MURAKAMI
Copyright (c) 2011-2016 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprout
Distributed under the Boost Software License, Version 1.0. (See accompanying
@ -130,14 +130,12 @@ namespace sprout {
return elem;
}
SPROUT_CXX14_CONSTEXPR reference at(size_type i) {
return i < size()
? elem
return i < size() ? elem
: (throw std::out_of_range("pit<>: index out of range"), elem)
;
}
SPROUT_CONSTEXPR const_reference at(size_type i) const {
return i < size()
? elem
return i < size() ? elem
: (throw std::out_of_range("pit<>: index out of range"), elem)
;
}
@ -155,7 +153,7 @@ namespace sprout {
}
// others:
SPROUT_CXX14_CONSTEXPR void rangecheck(size_type i) const {
return i >= size() ? throw std::out_of_range("uuid: index out of range")
return i >= size() ? throw std::out_of_range("pit<>: index out of range")
: (void)0
;
}

View file

@ -1,5 +1,5 @@
/*=============================================================================
Copyright (c) 2011-2015 Bolero MURAKAMI
Copyright (c) 2011-2016 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprout
Distributed under the Boost Software License, Version 1.0. (See accompanying

View file

@ -1,5 +1,5 @@
/*=============================================================================
Copyright (c) 2011-2015 Bolero MURAKAMI
Copyright (c) 2011-2016 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprout
Distributed under the Boost Software License, Version 1.0. (See accompanying