sl@0: // Copyright David Abrahams 2002. sl@0: // Distributed under the Boost Software License, Version 1.0. (See sl@0: // accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: #ifndef CONVERTIBLE_DWA2002614_HPP sl@0: # define CONVERTIBLE_DWA2002614_HPP sl@0: sl@0: # if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 241 sl@0: # include sl@0: # include sl@0: # endif sl@0: sl@0: // Supplies a runtime is_convertible check which can be used with tag sl@0: // dispatching to work around the Metrowerks Pro7 limitation with boost::is_convertible sl@0: namespace boost { namespace python { namespace detail { sl@0: sl@0: typedef char* yes_convertible; sl@0: typedef int* no_convertible; sl@0: sl@0: template sl@0: struct convertible sl@0: { sl@0: # if !defined(__EDG_VERSION__) || __EDG_VERSION__ > 241 || __EDG_VERSION__ == 238 sl@0: static inline no_convertible check(...) { return 0; } sl@0: static inline yes_convertible check(Target) { return 0; } sl@0: # else sl@0: template sl@0: static inline typename mpl::if_c< sl@0: is_convertible::value sl@0: , yes_convertible sl@0: , no_convertible sl@0: >::type check(X const&) { return 0; } sl@0: # endif sl@0: }; sl@0: sl@0: }}} // namespace boost::python::detail sl@0: sl@0: #endif // CONVERTIBLE_DWA2002614_HPP