Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 758 Bytes

compiler-error-c3551.md

File metadata and controls

25 lines (21 loc) · 758 Bytes
descriptiontitlems.datef1_keywordshelpviewer_keywordsms.assetid
Learn more about: Compiler Error C3551
Compiler Error C3551
10/07/2023
C3551
C3551
c8ee23da-6568-40db-93a6-3ddb7ac47712

Compiler Error C3551

if a trailing return type is used then the leading return type shall be the single type-specifier 'auto' (not 'type')

The leading return type in trailing return type syntax must contain only auto.

// C3551.cpp// compile with: /cconstautofunc1() -> const int; // C3551auto* func2() -> int*; // C3551auto& func3() -> int&; // C3551auto&& func4() -> int&&; // C3551decltype(auto) func5() -> int; // C3551autofunc6() -> int; // OK
close