Share via


Error del compilador C3551

si se usa un tipo de valor devuelto final, el tipo de valor devuelto inicial será el especificador de tipo único "auto" (no 'type')

El tipo de valor devuelto inicial en la sintaxis de tipo de valor devuelto final debe contener solo auto.

// C3551.cpp
// compile with: /c
const auto func1() -> const int;   // C3551
auto* func2() -> int*;   // C3551
auto& func3() -> int&;   // C3551
auto&& func4() -> int&&;   // C3551
decltype(auto) func5() -> int;   // C3551

auto func6() -> int;   // OK