"Alf P. Steinbach" <
alf.p.stein...@gmail.com> writes:
> Specifically, is
>
> auto foo() -> auto { return 42; }
>
> auto main() -> int
> {
> return foo();
> }
>
> ... valid?
>
> I'd guess that it's not valid as C++11, but possibly valid as
> C++14 or later.
fwiw, g++ and clang accept it without complaint under -std=c++14
and -std=c++17, but give a diagnostic under -std=c++11. That
result holds both with and without a -pedantic option.