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

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?

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

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.

I think this is the big one, which will give most of the benefit without causing too many complains about auto being less readable.

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?

Long types expressed via "typename something::foo" would be good candidates.

  - Doug