I think I encountered an error in Visual C ++ 2015, but I want to be sure. Consider this snippet:
template < typename T > decltype( auto ) f( T param ) { return param + 1; } int main() { auto i = f( 10 ); return 0; }
Visual C ++ 2015 gives this warning in the return statement:
warning C4552: '+': operator is not valid; expected operator with side effect
although it does not seem to affect the resulting code. Is this a compiler error?
user4832129
source share