Boost logo

Boost Users :

From: Ben Hutchings (ben.hutchings_at_[hidden])
Date: 2004-10-13 12:07:38


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>.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net