You can also save the const value to a local variable.
class A {
public:
static const int MY_CONST = 5;
};
void fun( int b ) {
int j = A::MY_CONST; // no problem
int k = std::min( A::MY_CONST, b ); // link error: undefined reference to `A::MY_CONST`
int l = std::min( j, b); // works
}