
"David B. Held" <dheld@codelogicconsulting.com> wrote in message news:cihmvu$3ik$1@sea.gmane.org...
#include <boost/static_assert.hpp>
template <typename T> struct foo { void bar(void) { BOOST_STATIC_ASSERT(false); } };
int main(void) { }
Is gcc wrong, or am I missing something really obvious? This used to work. And yes, I have the latest boost CVS snapshot.
Apparently gcc is right. See http://lists.boost.org/MailArchives/boost/msg06980.php. The suggested workaround (maybe that's the wrong term, if it's not a bug) is: template<class T> struct always_false { enum { value = 0 }; }; template <typename T> struct foo { void bar(void) { BOOST_STATIC_ASSERT(always_false<T>::value); } }; Best Regards, Jonathan