fork download
  1. template <typename> struct bang {};
  2.  
  3. int main() {
  4. int x;
  5. bang<decltype(0, x)> y;
  6. y = x;
  7. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:6:9: error: no match for 'operator=' in 'y = x'
prog.cpp:1:33: note: candidate is: bang<int&>& bang<int&>::operator=(const bang<int&>&)
stdout
Standard output is empty