
Joaquín Mª López Muñoz <joaquin <at> tid.es> writes:
OK, I think I've got it: MSVC++ 6.5 behaves funny with static constants inside templates, as it does not see their correct value during template parsing. For instance, the following:
#include <boost/config.hpp> #include <boost/static_assert.hpp>
template<typename T> struct foo { BOOST_STATIC_CONSTANT(int,x=2); BOOST_STATIC_ASSERT(x==2); };
int main() { return 0; }
fails at the static assertion line (x is seen as 1, btw). After instantiation, however, the static constant holds the correct value, this phenomenon only happens at the parsing stage.
Does this change BOOST_STATIC_ASSERT(foo<T>::x==2); // qualified name help?
Is it OK to commit? I'd rather disabled compile-time calculation.
-- Alexander