1
0
Fork 0
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:
bolero-MURAKAMI 2016-04-18 00:34:15 +09:00
parent 0080332dd5
commit 8efb1a3748
23 changed files with 1822 additions and 1384 deletions

View file

@ -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