Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:10:13

0001 // Boost.TypeErasure library
0002 //
0003 // Copyright 2015 Steven Watanabe
0004 //
0005 // Distributed under the Boost Software License Version 1.0. (See
0006 // accompanying file LICENSE_1_0.txt or copy at
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 //
0009 // $Id$
0010 
0011 #ifndef BOOST_TYPE_ERASURE_DYNAMIC_BINDING_HPP_INCLUDED
0012 #define BOOST_TYPE_ERASURE_DYNAMIC_BINDING_HPP_INCLUDED
0013 
0014 #include <boost/type_erasure/detail/dynamic_vtable.hpp>
0015 #include <boost/type_erasure/static_binding.hpp>
0016 
0017 namespace boost {
0018 namespace type_erasure {
0019 
0020 /**
0021  * Maps a set of placeholders to actual types.
0022  */
0023 template<class PlaceholderList>
0024 class dynamic_binding
0025 {
0026 public:
0027     template<class Map>
0028     dynamic_binding(const static_binding<Map>&)
0029     {
0030         impl.template init<Map>();
0031     }
0032     template<class Concept, class Map>
0033     dynamic_binding(const binding<Concept>& other, const static_binding<Map>&)
0034     {
0035         impl.template convert_from<Map>(*other.impl.table);
0036     }
0037 private:
0038     template<class Concept>
0039     friend class binding;
0040     typename ::boost::type_erasure::detail::make_dynamic_vtable<PlaceholderList>::type impl;
0041 };
0042 
0043 }
0044 }
0045 
0046 #endif