Boost logo

Boost Users :

From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2006-01-16 11:34:39


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net