[cfe-dev] Updating the C++ dcl.spec.auto tests

Douglas Gregor dgregor at apple.com
Tue Dec 21 07:30:40 PST 2010


On Dec 21, 2010, at 5:37 AM, Michael Price - Dev wrote:

> See inline comments.
> 
> On Dec 20, 2010, at 11:51 PM, Douglas Gregor <dgregor at apple.com> wrote:
> 
>> +auto x = 5; // OK: x has type int
>> +const auto *v = &x, u = 6; // OK: v has type const int*, u has type const int
>> 
>> It would be good to check here that "v" actually has type "const int *", e.g., with
>> 
>>   const int **vp = &v;
>> 
> 
> Might this be an opportunity to use static_assert<> and decltype, or do you think that would pollute the test?

Unless we're testing for specific interactions, I'd rather keep the tests for these features disjoint.

>> 
>> Eventually, we'll also needs tests for 'auto' within templates.
>> 
> 
> Also, perhaps lambdas should be represented in some capacity?

You can leave a FIXME for lambdas, if you'd like, but there's nothing we could add to the test now.

	- Doug



More information about the cfe-dev mailing list