fork download
  1. void operator"" _log ( const char* str, size_t size ) {
  2. std::cout << "yay" << std::endl;
  3. }
  4.  
  5. int main() {
  6. "Message"_log;
  7. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:6: warning: user-defined literals only available with -std=c++11 or -std=gnu++11 [enabled by default]
 void operator"" _log ( const char* str, size_t size ) {
      ^
prog.cpp:1:6: warning: user-defined literals only available with -std=c++11 or -std=gnu++11 [enabled by default]
prog.cpp:1:41: error: ‘size_t’ has not been declared
 void operator"" _log ( const char* str, size_t size ) {
                                         ^
prog.cpp:1:53: error: ‘void operator"" _log(const char*, int)’ has invalid argument list
 void operator"" _log ( const char* str, size_t size ) {
                                                     ^
prog.cpp: In function ‘int main()’:
prog.cpp:6:12: error: expected ‘;’ before ‘_log’
   "Message"_log;
            ^
prog.cpp:6:16: warning: statement has no effect [-Wunused-value]
   "Message"_log;
                ^
stdout

Standard output is empty