1 // Boost.TypeErasure library 2 // 3 // Copyright 2011 Steven Watanabe 4 // 5 // Distributed under the Boost Software License Version 1.0. (See 6 // accompanying file LICENSE_1_0.txt or copy at 7 // http://www.boost.org/LICENSE_1_0.txt) 8 // 9 // $Id$ 10 11 #ifndef BOOST_TYPE_ERASURE_BINDING_OF_HPP_INCLUDED 12 #define BOOST_TYPE_ERASURE_BINDING_OF_HPP_INCLUDED 13 14 #include <boost/type_erasure/detail/access.hpp> 15 #include <boost/type_erasure/any.hpp> 16 #include <boost/type_erasure/binding.hpp> 17 18 namespace boost { 19 namespace type_erasure { 20 21 /** 22 * \return The type bindings of an @ref any. 23 * 24 * \throws Nothing. 25 */ 26 template<class Concept, class T> binding_of(const any<Concept,T> & arg)27const binding<Concept>& binding_of(const any<Concept, T>& arg) 28 { 29 return ::boost::type_erasure::detail::access::table(arg); 30 } 31 32 } 33 } 34 35 #endif 36