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

add subscript_at function

This commit is contained in:
bolero-MURAKAMI 2016-04-17 19:36:56 +09:00
parent 8278a2642c
commit 0080332dd5
12 changed files with 341 additions and 54 deletions

View file

@ -26,12 +26,14 @@ namespace sprout {
// otherwise, Container is not const
// && sprout::is_const_cast_convertible<const_reference, reference>
// && (callable sprout::as_const(cont).at(i)
// || callable sprout::as_const(cont)[i]
// || callable sprout::as_const(cont).begin()
// || ADL(without sprout) callable begin(sprout::as_const(cont))
// )
// -> const_cast<reference>(sprout::at(sprout::as_const(cont), i))
// otherwise, callable cont.at(i) -> cont.at(i)
// otherwise -> *sprout::next(sprout::begin(cont), i)
// otherwise, callable cont[i] -> cont[sprout::range_index_check(cont, i)]
// otherwise -> *sprout::next(sprout::begin(cont), sprout::range_index_check(cont, i))
//
template<typename Container>
inline SPROUT_CONSTEXPR typename sprout::container_traits<Container>::reference