Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-04-13 06:51:07


"Vladimir Prus" <ghost_at_[hidden]> wrote in message
news:c5g491$ig4$1_at_sea.gmane.org...

>I wish we can get away from BOOST_LVALUE too. The simple approach of:
>
> template<class T>
> void sort(T t) {}
>
> template<class T>
> void sort(T& t) {}
>
>does not really work, since there's ambiguity when passing non-const
>reference

One is a language change like &&. If we had

 template<class T>
 void sort(T t) {}

 template<class T>
 void sort(T& t) {}

template< class T >
void sort( const T& t )

wouldn't it be possible to enable/disable certain combination in certain
situaltions, so it
would just work ? Anyway, my brain has stopped thinking, so I'll better do
some homework.

br

Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk