binding_of.hpp 763 B

1234567891011121314151617181920212223242526272829303132333435
  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. #ifndef BOOST_TYPE_ERASURE_BINDING_OF_HPP_INCLUDED
  11. #define BOOST_TYPE_ERASURE_BINDING_OF_HPP_INCLUDED
  12. #include <boost/type_erasure/detail/access.hpp>
  13. #include <boost/type_erasure/any.hpp>
  14. #include <boost/type_erasure/binding.hpp>
  15. namespace boost {
  16. namespace type_erasure {
  17. /**
  18. * \return The type bindings of an @ref any.
  19. *
  20. * \throws Nothing.
  21. */
  22. template<class Concept, class T>
  23. const binding<Concept>& binding_of(const any<Concept, T>& arg)
  24. {
  25. return ::boost::type_erasure::detail::access::table(arg);
  26. }
  27. }
  28. }
  29. #endif