1 // Copyright David Abrahams 2002.
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef IMPLICIT_DWA2002325_HPP
6 # define IMPLICIT_DWA2002325_HPP
8 # include <boost/python/detail/prefix.hpp>
9 # include <boost/type.hpp>
10 # include <boost/python/converter/implicit.hpp>
11 # include <boost/python/converter/registry.hpp>
12 #ifndef BOOST_PYTHON_NO_PY_SIGNATURES
13 # include <boost/python/converter/pytype_function.hpp>
15 # include <boost/python/type_id.hpp>
17 namespace boost { namespace python {
19 template <class Source, class Target>
20 void implicitly_convertible(boost::type<Source>* = 0, boost::type<Target>* = 0)
22 typedef converter::implicit<Source,Target> functions;
24 converter::registry::push_back(
25 &functions::convertible
26 , &functions::construct
28 #ifndef BOOST_PYTHON_NO_PY_SIGNATURES
29 , &converter::expected_from_python_type_direct<Source>::get_pytype
34 }} // namespace boost::python
36 #endif // IMPLICIT_DWA2002325_HPP