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

change range functions adapt

This commit is contained in:
bolero-MURAKAMI 2016-04-17 16:11:43 +09:00
parent 92cc7881d6
commit 8278a2642c
15 changed files with 454 additions and 100 deletions

View file

@ -23,6 +23,13 @@ namespace sprout {
// ADL callable range_at(cont, i) -> range_at(cont, i)
// [default]
// Container is T[N] -> cont[i]
// 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).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)
//