fork(4) download
  1. void func0(bool=false); //ok
  2. void func1(bool=8>=8); //ok
  3.  
  4. template<bool>struct a{constexpr a(bool){}};
  5.  
  6. a<0> var=0; //ok
  7. map<int,int> m; //ok
  8.  
  9. void func2(a<0>=8>=8) //fail
  10. {
  11. #define F(TYPE,NAME)TYPE NAME;
  12. F(map<int,int>,m); //fail
  13. #undef F
  14. }
  15. int main(){return 0;}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:12:19: error: macro "F" passed 3 arguments, but takes just 2
   F(map<int,int>,m); //fail
                   ^
prog.cpp:7:1: error: ‘map’ does not name a type
 map<int,int> m; //ok
 ^
prog.cpp:9:18: warning: comparisons like ‘X<=Y<=Z’ do not have their mathematical meaning [-Wparentheses]
 void func2(a<0>=8>=8) //fail
                  ^
prog.cpp:9:12: error: parse error in template argument list
 void func2(a<0>=8>=8) //fail
            ^
prog.cpp: In function ‘void func2(a<false>)’:
prog.cpp:12:3: error: ‘F’ was not declared in this scope
   F(map<int,int>,m); //fail
   ^
stdout
Standard output is empty