Hi, Compiling the following code on Borland 5.6:
_________________________________ template < size_t N > struct widget {}; template < class T > struct foo { BOOST_STATIC_CONSTANT( size_t, static_constant = 42 ); typedef widget< static_constant > bar_1; size_t bar_2() { return static_constant; } }; _________________________________ Gives the following three errors on the line that defines bar_1: Member foo<T>::static_constant cannot be used without an object Invalid template argument list Declaration terminated incorrectly The bar_2 member function compiles fine. Also, if I make foo a non-template class, everything compiles fine. This compiler does not result in the definition of BOOST_NO_INCLASS_MEMBER_INITIALIZATION so the enum-hack isn't used. However, if I do in fact use the enum-hack the above code compiles fine too. Am I missing something here, or maybe Borlands static-class-constants behaviour is not 100% perfect.... Thanks, Jaap Suter _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost