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