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