Test: reference_to_temporary.cpp reference_to_temporary.cpp:28:2: error: expected '}' at end of input 28 | } | ^ reference_to_temporary.cpp:5:14: note: to match this '{' 5 | class Config { | ^ reference_to_temporary.cpp: In member function 'std::string Config::getAppName()': reference_to_temporary.cpp:8:37: error: a function-definition is not allowed here before '{' token 8 | const std::string& getAppName() { | ^ reference_to_temporary.cpp:12:19: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 12 | int getVersion() { | ^~ reference_to_temporary.cpp:12:19: note: remove parentheses to default-initialize a variable 12 | int getVersion() { | ^~ | -- reference_to_temporary.cpp:12:19: note: or replace parentheses with braces to value-initialize a variable reference_to_temporary.cpp:12:22: error: a function-definition is not allowed here before '{' token 12 | int getVersion() { | ^ reference_to_temporary.cpp:15:1: warning: no return statement in function returning non-void [-Wreturn-type] 15 | }; | ^ reference_to_temporary.cpp: In member function 'int Config::main()': reference_to_temporary.cpp:21:26: error: 'class Config' has no member named 'getVersion' 21 | int version = config.getVersion(); | ^~~~~~~~~~ reference_to_temporary.cpp: At global scope: reference_to_temporary.cpp:28:2: error: expected unqualified-id at end of input 28 | } | ^