substitute_fwd.hpp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //-----------------------------------------------------------------------------
  2. // boost variant/detail/substitute_fwd.hpp header file
  3. // See http://www.boost.org for updates, documentation, and revision history.
  4. //-----------------------------------------------------------------------------
  5. //
  6. // Copyright (c) 2003
  7. // Eric Friedman
  8. //
  9. // Distributed under the Boost Software License, Version 1.0. (See
  10. // accompanying file LICENSE_1_0.txt or copy at
  11. // http://www.boost.org/LICENSE_1_0.txt)
  12. #ifndef BOOST_VARIANT_DETAIL_SUBSTITUTE_FWD_HPP
  13. #define BOOST_VARIANT_DETAIL_SUBSTITUTE_FWD_HPP
  14. #include <boost/mpl/aux_/lambda_arity_param.hpp>
  15. #include <boost/mpl/aux_/template_arity.hpp>
  16. #include <boost/mpl/int_fwd.hpp>
  17. ///////////////////////////////////////////////////////////////////////////////
  18. // BOOST_VARIANT_DETAIL_NO_SUBSTITUTE
  19. //
  20. // Defined if 'substitute' is not implementable on the current compiler.
  21. //
  22. #include <boost/mpl/aux_/config/ctps.hpp>
  23. #include <boost/mpl/aux_/config/ttp.hpp>
  24. #if defined(BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS) \
  25. && !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
  26. # define BOOST_VARIANT_DETAIL_NO_SUBSTITUTE
  27. #endif
  28. namespace boost {
  29. namespace detail { namespace variant {
  30. #if !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
  31. ///////////////////////////////////////////////////////////////////////////////
  32. // metafunction substitute
  33. //
  34. // Substitutes one type for another in the given type expression.
  35. //
  36. template <
  37. typename T, typename Dest, typename Source
  38. BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(
  39. typename Arity = mpl::int_< mpl::aux::template_arity<T>::value >
  40. )
  41. >
  42. struct substitute;
  43. #endif // !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
  44. }} // namespace detail::variant
  45. } // namespace boost
  46. #endif // BOOST_VARIANT_DETAIL_SUBSTITUTE_FWD_HPP