I'm getting a curious linker error when passing a static member variable to std::min.
const static int val = 555;
int x = std::min(344, test::val);
This causes a linker error with an undefined reference to test::val. It's easy enough to work around - I can simply use a temporary like this:
int x = std::min(344, int(test::val));
But why do I need to do this? Is it something to do with std::min being a templated function?