equal
deleted
inserted
replaced
|
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 |
|
7 |
|
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 # include <boost/python/type_id.hpp> |
|
13 |
|
14 namespace boost { namespace python { |
|
15 |
|
16 template <class Source, class Target> |
|
17 void implicitly_convertible(boost::type<Source>* = 0, boost::type<Target>* = 0) |
|
18 { |
|
19 typedef converter::implicit<Source,Target> functions; |
|
20 |
|
21 converter::registry::push_back( |
|
22 &functions::convertible |
|
23 , &functions::construct |
|
24 , type_id<Target>()); |
|
25 } |
|
26 |
|
27 }} // namespace boost::python |
|
28 |
|
29 #endif // IMPLICIT_DWA2002325_HPP |