Actually, it would be nice, if a future version of the C++ standard allowed auto
also on non-static members, if an initializer is present, as in this simple example:
class C {
auto a { 0.0 };
auto b { 3U };
};
This would be equivalent to:
class C {
decltype(0.0) a { 0.0 };
decltype(3U) b { 3U };
};
and would save some typing in certain cases, especially, where the initializing expressions are not as simple as here. Of course, the in-class initializers can later be overridden in constructors, but for the typing of the class members, the in-class initializers should take precedence.