
18 Sep
2004
18 Sep
'04
10:35 p.m.
Jonathan Turkanis wrote:
[...] namespace boost { namespace detail { template<class Dummy> struct always_false { enum { value = 0 }; }; } } // namespace
#define BOOST_STATIC_ASSERT_FALSE(x) \ BOOST_STATIC_ASSERT(::boost::detail::always_false< x >::value);
Beautiful. So who volunteers to put it somewhere appropriate?
Of course we could also use:
#define BOOST_STATIC_ASSERT_FALSE(x) \ BOOST_STATIC_ASSERT((mpl::apply<mpl::always<mpl::false_>, x>::value));
but that seems like overkill.
Hahahaha! If we have to resort to apply<>, we've definitely gone too far. Of course, someone will come up with a use case where apply<> should be used, and then I'll have to eat my words. :( Dave