fork download
  1. #include <iostream>
  2.  
  3. struct foo
  4. {
  5. static constexpr int value = 42;
  6. };
  7.  
  8. void bar(const int* p) { std::cout << p << "\n"; }
  9.  
  10. int main() { bar(&foo::value); }
  11.  
Compilation error #stdin compilation error #stdout 0s 3408KB
stdin
Standard input is empty
compilation info
/home/QeYCHp/ccOftXNE.o: In function `main':
prog.cpp:(.text.startup+0x12): undefined reference to `foo::value'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty