As expected, the following fails in C++11 because that language does not have return type deduction for bog standard functions:
However, C++14 does, so I cannot explain the following error (with equivalent outcomes in GCC trunk, clang 3.8 and Visual Studio 2015):
error: 'main' must return 'int'
Is there a passage in the standard that I'm not seeing, forbidding return type deduction for
? Or are both compilers non-compliant?
(For what it's worth, I'd never actually do this.
for the win…)