From 87bda9e124ff3c0bab16bff320c6000be353354d Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 17 Jun 2002 22:26:17 +0000 Subject: [PATCH] work around early EDG problem [SVN r14164] --- include/boost/python/detail/convertible.hpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/include/boost/python/detail/convertible.hpp b/include/boost/python/detail/convertible.hpp index 2a4d5106..f767ebfd 100755 --- a/include/boost/python/detail/convertible.hpp +++ b/include/boost/python/detail/convertible.hpp @@ -6,6 +6,11 @@ #ifndef CONVERTIBLE_DWA2002614_HPP # define CONVERTIBLE_DWA2002614_HPP +# if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 241 +# include +# include +# endif + // Supplies a runtime is_convertible check which can be used with tag // dispatching to work around the Metrowerks Pro7 limitation with boost::is_convertible namespace boost { namespace python { namespace detail { @@ -16,8 +21,17 @@ typedef int* no_convertible; template struct convertible { - static inline yes_convertible check(Target) { return 0; } +# if !defined(__EDG_VERSION__) || __EDG_VERSION__ > 241 static inline no_convertible check(...) { return 0; } + static inline yes_convertible check(Target) { return 0; } +# else + template + static inline typename mpl::select_type< + is_convertible::value + , yes_convertible + , no_convertible + >::type check(X const&) { return 0; } +# endif }; }}} // namespace boost::python::detail