[cfe-commits] [patch] Decltype in simple-type-specifiers
Richard Smith
richard at metafoo.co.uk
Mon Jan 23 19:45:12 PST 2012
Looks good to me.
(Unrelated to your change...) while looking at your [stmt.ambig]p1 test, I
noticed that we appear to disambiguate
T(x)()->m;
as an expression, when T and m are both types. I'm not sure that's right: it's
not clear whether the "purely syntactic" disambiguation covers the "T must be
'auto'" rule or not.
FWIW, recent g++ rejects the above (it says: function with trailing return
type not declared with 'auto' type specifier).
- Richard
On Sat, January 21, 2012 09:48, David Blaikie wrote:
> Bump... another really small patch.
>
>
> On Mon, Jan 9, 2012 at 11:17 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>> 3rd time's the charm... sorry for the noise.
>>
>>
>> On Mon, Jan 9, 2012 at 11:14 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>
>>> Oops - updated test (removed some previously expected warnings that
>>> don't fire any more since we've got some of the uniform initialization
>>> stuff working now)
>>>
>>> On Mon, Jan 9, 2012 at 10:23 PM, David Blaikie <dblaikie at gmail.com>
>>> wrote:
>>>
>>>> Bump (patch resync'd to recent revision)
>>>>
>>>>
>>>> On Tue, Dec 13, 2011 at 4:12 PM, David Blaikie <dblaikie at gmail.com>
>>>> wrote:
>>>>
>>>>> & of course I forgot to include the patch... here we go.
>>>>>
>>>>>
>>>>> On Tue, Dec 13, 2011 at 4:11 PM, David Blaikie <dblaikie at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> This patch adds support for decltype in simple-type-specifiers such
>>>>>> as:
>>>>>>
>>>>>>
>>>>>> struct foo { foo(int); }; foo func() { return decltype(foo())(3);
>>>>>> }
>>>>>>
>>>>>>
>>>>>> I'm not sure how much testing would be desired here - I could go
>>>>>> through the spec & find all the uses of simple-type-specifier & add
>>>>>> test cases that verify that decltype works in such contexts but for
>>>>>> now I've done a smattering of those cases & things seem to be
>>>>>> working fairly nicely.
>>>>>>
>>>>>> Let me know if this is suitable,
>>>>>> - David
>>>>>>
>
More information about the cfe-commits
mailing list