From e11fbe4ab773e456d560d12ef073d373b3249fae Mon Sep 17 00:00:00 2001
From: Petr Machata <pmachata@redhat.com>
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
|
b
|
|
12 | 12 | # include <boost/type.hpp> |
13 | 13 | # include <boost/python/base_type_traits.hpp> |
14 | 14 | # include <boost/python/detail/convertible.hpp> |
| 15 | # include <boost/static_assert.hpp> |
15 | 16 | |
16 | 17 | namespace boost { namespace python { |
17 | 18 | |
… |
… |
namespace detail
|
70 | 71 | template <class T> |
71 | 72 | inline void assert_castable(boost::type<T>* = 0) |
72 | 73 | { |
73 | | typedef char must_be_a_complete_type[sizeof(T)]; |
| 74 | // T must be a complete type. |
| 75 | BOOST_STATIC_ASSERT(sizeof(T) == sizeof(T)); |
74 | 76 | } |
75 | 77 | |
76 | 78 | template <class Source, class Target> |