mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add container_range_traits default
This commit is contained in:
parent
0080332dd5
commit
8efb1a3748
23 changed files with 1822 additions and 1384 deletions
|
@ -20,8 +20,8 @@ namespace sprout {
|
|||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::container_traits<Container const>::size_type
|
||||
range_index_check(Container const& cont, typename sprout::container_traits<Container const>::size_type i) {
|
||||
return i >= sprout::size(cont) ? throw std::out_of_range("range_index_check: index out of range")
|
||||
: i
|
||||
return i < sprout::size(cont) ? i
|
||||
: throw std::out_of_range("range_index_check: index out of range")
|
||||
;
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue