fork download
  1. #include <iostream>
  2.  
  3. struct t{ const std::size_t value = 10; };
  4.  
  5. int main(){
  6. std::cout << t::value << std::endl;
  7. return 0;
  8. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:37: error: ISO C++ forbids initialization of member 'value'
prog.cpp:3:37: error: making 'value' static
stdout
Standard output is empty