Skip to content

Commit 6d2ee96

Browse files
committed
improve error message
[SVN r35822]
1 parent a74c8e3 commit 6d2ee96

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

include/boost/python/make_constructor.hpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
# include <boost/mpl/int.hpp>
2424
# include <boost/mpl/push_front.hpp>
2525
# include <boost/mpl/pop_front.hpp>
26+
# include <boost/mpl/assert.hpp>
2627

2728
namespace boost { namespace python {
2829

@@ -103,12 +104,14 @@ namespace detail
103104

104105
// If the BasePolicy_ supplied a result converter it would be
105106
// ignored; issue an error if it's not the default.
106-
BOOST_STATIC_ASSERT((
107-
is_same<
107+
BOOST_MPL_ASSERT_MSG(
108+
(is_same<
108109
typename BasePolicy_::result_converter
109110
, default_result_converter
110-
>::value
111-
));
111+
>::value)
112+
, MAKE_CONSTRUCTOR_SUPPLIES_ITS_OWN_RESULT_CONVERTER_THAT_WOULD_OVERRIDE_YOURS
113+
, (typename BasePolicy_::result_converter)
114+
);
112115

113116
typedef constructor_result_converter result_converter;
114117
typedef offset_args<typename BasePolicy_::argument_package, mpl::int_<1> > argument_package;

0 commit comments

Comments
 (0)