mirror of
https://github.com/boostorg/python.git
synced 2026-01-24 06:02:14 +00:00
work around early EDG problem
[SVN r14164]
This commit is contained in:
@@ -6,6 +6,11 @@
|
||||
#ifndef CONVERTIBLE_DWA2002614_HPP
|
||||
# define CONVERTIBLE_DWA2002614_HPP
|
||||
|
||||
# if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 241
|
||||
# include <boost/mpl/select_type.hpp>
|
||||
# include <boost/type_traits/conversion_traits.hpp>
|
||||
# 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 <class Target>
|
||||
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 <class X>
|
||||
static inline typename mpl::select_type<
|
||||
is_convertible<X,Target>::value
|
||||
, yes_convertible
|
||||
, no_convertible
|
||||
>::type check(X const&) { return 0; }
|
||||
# endif
|
||||
};
|
||||
|
||||
}}} // namespace boost::python::detail
|
||||
|
||||
Reference in New Issue
Block a user