Boost logo

Boost :

Subject: Re: [boost] [result_of] now uses decltype on release branch
From: Michel Morin (mimomorin_at_[hidden])
Date: 2012-09-10 22:38:56


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


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