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:
parent
8278a2642c
commit
0080332dd5
12 changed files with 341 additions and 54 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue