Boost logo

Boost :

Subject: Re: [boost] [config] What Feature is this??
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2017-07-25 07:29:57


On 07/25/17 03:40, Gavin Lambert via Boost wrote:
> On 25/07/2017 12:19, Andrey Semashev wrote:
>> On Tue, Jul 25, 2017 at 2:17 AM, Gavin Lambert wrote:
>>> On 25/07/2017 06:26, Edward Diener wrote:
>>>>
>>>> Thanks, John, I just fell asleep by not realizing you were talking
>>>> about
>>>> SFINAE ala enable_if etc. I am surprised that any compiler would
>>>> operate
>>>> differently in regard to SFINAE between using the C++03 'return-type
>>>> some_function(etc.)' form and the C++11 'auto some_function(etc.) ->
>>>> return-type' form, whether decltype was used or not.
>>>
>>> They don't AFAIK, but you can't use the parameter types in an expression
>>> until after they are actually declared as parameters, thus requiring the
>>> auto -> form.
>>
>> To be more precise, you can use parameter *types* but not parameter
>> *names*. Types are declared by the template<...> prefix.
>
> I thought there was also a related issue with template type inference
> that way though, but it's possible I'm misremembering.

I'm not aware of such issue, but we surely did use SFINAE in function
return types since C++03 era.


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