[cfe-dev] [RFC] How do you want the auto type specifier transform to work?

Manuel Klimek klimek at google.com
Thu Jan 31 07:28:46 PST 2013


On Thu, Jan 31, 2013 at 3:18 PM, Vane, Edwin <edwin.vane at intel.com> wrote:

> Hi all,
>
> I'm resuming work on the cpp11-migrate transform that introduces the auto
> type specifier. I've already implemented one option which is to replace all
> type specifiers that inherit from std::iterator or have std iterator
> traits. There are several other options though. For example, replace all
> type specifiers of a sufficient complexity (measured in character length or
> perhaps number of scope resolution operators).
>
> What behaviours would be most useful to you?
>

Replace all type specifiers that are redundant within the same statement.
For example:
MyClass *P = new MyClass(...);
or
MyClass *P = myFactory<MyClass>(...);

For the second one it might not be obvious any more whether it's really a
"readability win", so I think in general this is a hard problem.

Cheers,
/Manuel


>
> --
> Edwin Vane
>   Software Developer
>   Intel of Canada, Inc.
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130131/d5c39f7d/attachment.html>


More information about the cfe-dev mailing list