mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add const_reference_cast
This commit is contained in:
parent
8efb1a3748
commit
bd2194e331
11 changed files with 215 additions and 26 deletions
|
@ -24,12 +24,12 @@ namespace sprout {
|
|||
// [default]
|
||||
// Container is T[N] -> cont[N - 1]
|
||||
// otherwise, Container is not const
|
||||
// && sprout::is_const_cast_convertible<const_reference, reference>
|
||||
// && sprout::is_const_reference_cast_convertible<const_reference, reference>
|
||||
// && (callable sprout::as_const(cont).back()
|
||||
// || callable sprout::as_const(cont).begin()
|
||||
// || ADL(without sprout) callable begin(sprout::as_const(cont))
|
||||
// )
|
||||
// -> const_cast<reference>(sprout::back(sprout::as_const(cont)))
|
||||
// -> sprout::const_reference_cast<reference>(sprout::back(sprout::as_const(cont)))
|
||||
// otherwise, callable cont.back() -> cont.back()
|
||||
// otherwise -> *sprout::next(sprout::begin(cont), sprout::size(cont) - 1)
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue