From e11fbe4ab773e456d560d12ef073d373b3249fae Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Thu, 5 Sep 2013 23:26:14 +0200 Subject: [PATCH 3/3] [python] Convert a static-assert-like construct to BOOST_STATIC_ASSERT - Since for failures, this will never evaluate anyway, there's no need to use BOOST_MPL_ASSERT_MSG. --- boost/python/cast.hpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/boost/python/cast.hpp b/boost/python/cast.hpp index 31c61db..90be1e6 100644 --- a/boost/python/cast.hpp +++ b/boost/python/cast.hpp @@ -12,6 +12,7 @@ # include # include # include +# include namespace boost { namespace python { @@ -70,7 +71,8 @@ namespace detail template inline void assert_castable(boost::type* = 0) { - typedef char must_be_a_complete_type[sizeof(T)]; + // T must be a complete type. + BOOST_STATIC_ASSERT(sizeof(T) == sizeof(T)); } template -- 1.7.6.5