From: Daniel Wallin (dalwan01_at_[hidden])
Date: 2004-04-19 07:56:24
David Abrahams wrote:
> On the other hand, with technique 2
> I think you can't write the generic function at all, because template
> arguments have to match exactly:
> template <class T>
> void f(const_lvalue<Y<T> > x); // can never match a Y<T> argument
Isn't this true for technique 1 as well (and everything that isn't &&)?
void f(move_from<T> x);
Granted, you can detect lvalues in a generic function, but that
isn't of much use if you can't detect temporaries, no?
-- Daniel Wallin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk