
30 Apr
2009
30 Apr
'09
6:12 p.m.
David Abrahams wrote:
I need a way to detect whether a type "has a move constructor" (without causing a compiler error, of course) in GCC 4.4.
What about creating a type U that inherits from T, does using T::T, and deletes U(const U&). Now you just have to check whether U(make<U>()) is a valid expression using SFINAE for expressions.