os/ossrv/ossrv_pub/boost_apis/boost/python/implicit.hpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/python/implicit.hpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,29 @@
     1.4 +// Copyright David Abrahams 2002.
     1.5 +// Distributed under the Boost Software License, Version 1.0. (See
     1.6 +// accompanying file LICENSE_1_0.txt or copy at
     1.7 +// http://www.boost.org/LICENSE_1_0.txt)
     1.8 +#ifndef IMPLICIT_DWA2002325_HPP
     1.9 +# define IMPLICIT_DWA2002325_HPP
    1.10 +
    1.11 +# include <boost/python/detail/prefix.hpp>
    1.12 +# include <boost/type.hpp>
    1.13 +# include <boost/python/converter/implicit.hpp>
    1.14 +# include <boost/python/converter/registry.hpp>
    1.15 +# include <boost/python/type_id.hpp>
    1.16 +
    1.17 +namespace boost { namespace python { 
    1.18 +
    1.19 +template <class Source, class Target>
    1.20 +void implicitly_convertible(boost::type<Source>* = 0, boost::type<Target>* = 0)
    1.21 +{
    1.22 +    typedef converter::implicit<Source,Target> functions;
    1.23 +    
    1.24 +    converter::registry::push_back(
    1.25 +          &functions::convertible
    1.26 +        , &functions::construct
    1.27 +        , type_id<Target>());
    1.28 +}
    1.29 +
    1.30 +}} // namespace boost::python
    1.31 +
    1.32 +#endif // IMPLICIT_DWA2002325_HPP