Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 9 years ago

Language

Compiler

Options

Author

anonymous

over 9 years ago

$
prog.cc:9:11: error: implicit instantiation of undefined template 'TD<int &&>'
    TD<T> td1;
          ^
prog.cc:16:5: note: in instantiation of function template specialization 'f<int &&>' requested here
    f<int&&>(1); // これは、Tがint&&なので、decltype((v))は、int&& &で、参照の圧縮がなされてint&と解釈される    
    ^
prog.cc:4:7: note: template is declared here
class TD;
      ^
prog.cc:10:21: error: implicit instantiation of undefined template 'TD<int &&>'
    TD<decltype(v)> td2;
                    ^
prog.cc:4:7: note: template is declared here
class TD;
      ^
prog.cc:11:23: error: implicit instantiation of undefined template 'TD<int &>'
    TD<decltype((v))> td3;
                      ^
prog.cc:4:7: note: template is declared here
class TD;
      ^
3 errors generated.
Exit Code:
1