type_template_param.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright (C) 2005 Arkadiy Vertleyb
  2. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #ifndef BOOST_TYPEOF_TYPE_TEMPLATE_PARAM_HPP_INCLUDED
  5. #define BOOST_TYPEOF_TYPE_TEMPLATE_PARAM_HPP_INCLUDED
  6. #define BOOST_TYPEOF_class_BOOST_TYPEOF (class)
  7. #define BOOST_TYPEOF_typename_BOOST_TYPEOF (typename)
  8. #define BOOST_TYPEOF_MAKE_OBJ_class BOOST_TYPEOF_TYPE_PARAM
  9. #define BOOST_TYPEOF_MAKE_OBJ_typename BOOST_TYPEOF_TYPE_PARAM
  10. #define BOOST_TYPEOF_TYPE_PARAM\
  11. (TYPE_PARAM)
  12. #define BOOST_TYPEOF_TYPE_PARAM_EXPANDTYPE(Param) class
  13. // TYPE_PARAM "virtual functions" implementation
  14. #define BOOST_TYPEOF_TYPE_PARAM_ENCODE(This, n)\
  15. typedef typename boost::type_of::encode_type<\
  16. BOOST_PP_CAT(V, n),\
  17. BOOST_PP_CAT(P, n)\
  18. >::type BOOST_PP_CAT(V, BOOST_PP_INC(n));
  19. #define BOOST_TYPEOF_TYPE_PARAM_DECODE(This, n)\
  20. typedef boost::type_of::decode_type< BOOST_PP_CAT(iter, n) > BOOST_PP_CAT(d, n);\
  21. typedef typename BOOST_PP_CAT(d, n)::type BOOST_PP_CAT(P, n);\
  22. typedef typename BOOST_PP_CAT(d, n)::iter BOOST_PP_CAT(iter, BOOST_PP_INC(n));
  23. #define BOOST_TYPEOF_TYPE_PARAM_PLACEHOLDER(Param) int
  24. #define BOOST_TYPEOF_TYPE_PARAM_DECLARATION_TYPE(Param) class
  25. #define BOOST_TYPEOF_TYPE_PARAM_PLACEHOLDER_TYPES(Param, n) BOOST_PP_CAT(T,n)
  26. #define BOOST_TYPEOF_TYPE_PARAM_ISTEMPLATE 0
  27. #endif//BOOST_TYPEOF_TYPE_TEMPLATE_PARAM_HPP_INCLUDED