16 Jan
2006
16 Jan
'06
4:34 p.m.
MB wrote:
Sebastian Redl wrote:
I think 'add_const' is reserved for Boost.TypeTraits.
I post this tiny proposal to Boost.Devel anyway.
When we discussed the wg21 proposal many months ago and I added const_begin() etc to boost.range, Dave Abrahams used this function template< class T > inline T const& as_const( T const& r ) { return r; } Similarly, we might add as_volatile(); as_const_volatile(); as_mutable(); The latter would be a cast from rvalue to lvalue like it happens in boost.foreach. -Thorsten