
11 Sep
2012
11 Sep
'12
2:38 a.m.
Eric Niebler wrote:
All the use of `std::declval<F>()(...)` is in decltype and so I don't see any problem in the code. Do you mean struct result_of_aux< F(Args...) , decltype(std::declval<F>()(std::declval<Args>()...), void ()) > can be a hard error?
Yes indeedy.
struct X; X foo();
typedef decltype(foo()) Y; // OK typedef decltype(foo(), void()) Z; // ERROR
Ah yes, it indeed produces an error. Thanks! Regards, Michel