fork(1) download
  1. #include <algorithm>
  2.  
  3. class A {
  4. public:
  5. static const int MY_CONST = 5;
  6. };
  7.  
  8. int main() {
  9. int b = 10;
  10. int j = A::MY_CONST; // no problem
  11. int k = std::min<int>( A::MY_CONST, b ); // link error:
  12. // undefined reference to `A::MY_CONST`
  13. }
Success #stdin #stdout 0s 2848KB
stdin
Standard input is empty
stdout
Standard output is empty