fork(1) download
  1. #include <bitset>
  2.  
  3. template <int N>
  4. void printBitset(std::bitset<N> bs)
  5. {
  6. }
  7.  
  8. int main()
  9. {
  10. std::bitset<32> bs(63);
  11. printBitset(bs);
  12. }
Compilation error #stdin compilation error #stdout 0s 3336KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:11:16: error: no matching function for call to ‘printBitset(std::bitset<32u>&)’
  printBitset(bs);
                ^
prog.cpp:11:16: note: candidate is:
prog.cpp:4:6: note: template<int N> void printBitset(std::bitset<N>)
 void printBitset(std::bitset<N> bs)
      ^
prog.cpp:4:6: note:   template argument deduction/substitution failed:
prog.cpp:11:16: note:   mismatched types ‘int’ and ‘#‘integer_cst’ not supported by dump_type#<type error>’
  printBitset(bs);
                ^
prog.cpp:11:16: note:   ‘std::bitset<32u>’ is not derived from ‘std::bitset<N>’
stdout
Standard output is empty