13 Oct
2004
13 Oct
'04
5:07 p.m.
Thomas S. Urban wrote:
The BOOST_STATIC_ASSERT documentation indicates I can use it at template class scope (private recommended) - the assert shouldn't get triggered unless the class is instantiated. This seems to work ok with gcc-3.* but not with the intel compiler (8.1).
// begin example program #include "boost/static_assert.hpp"
template<class T> struct foo { foo (int) { } private: BOOST_STATIC_ASSERT (false); }; <snip>
There is a known problem with compilers that implement standard two-phase name resolution in templates. See http://lists.boost.org/MailArchives/boost/msg06980.php.