Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 9 years ago

Language

Compiler

Options

Author

anonymous

almost 9 years ago

$
prog.cc:11:17: warning: unused parameter 'a' [-Wunused-parameter]
    B (const A& a) { std::cout << "B constructed" << std::endl; }
                ^
prog.cc:18:17: error: parameter declarator cannot be qualified
    B b2 (B (A::giveA ())); // C2751
             ~~~^
prog.cc:18:10: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]
    B b2 (B (A::giveA ())); // C2751
         ^~~~~~~~~~~~~~~~~
prog.cc:18:11: note: add a pair of parentheses to declare a variable
    B b2 (B (A::giveA ())); // C2751
          ^
          (              )
2 warnings and 1 error generated.
Exit Code:
1