fork download
  1. struct X {
  2. int x : 20;
  3. int y : 12;
  4. };
  5.  
  6. void f(const int& x) {}
  7.  
  8. void f(int& x) {}
  9.  
  10. int main() {
  11. X o;
  12. f(o.x);
  13. }
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:12:8: error: cannot bind bitfield 'o.X::x' to 'int&'
stdout
Standard output is empty