Is it possible to ignore the trailing return type feature of c++11 in favor of the function return type deduction feature of c++14?
When I skip the return type of an expression The following code in C++11 : auto function(X x, Y y) -> decltype(x + y) { return x + y; } Is equal to the following code in C++14 : decltype(auto) function(X x, Y y) { return x + y; } But additionally it is possible to deduce the return type without decltype rules in C++14 : auto function() { return 0; } When I know what the return type is exactly The following code in C++11 : auto function() -> int { return 0; } Is equal to the following code in C++03 : int function() { return 0; } A strange example that should never happen The following code in C