target.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*==============================================================================
  2. Copyright (c) 2001-2010 Joel de Guzman
  3. Copyright (c) 2010 Thomas Heller
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ==============================================================================*/
  7. #ifndef BOOST_PHOENIX_OBJECT_DETAIL_CAST_TARGET_HPP
  8. #define BOOST_PHOENIX_OBJECT_DETAIL_CAST_TARGET_HPP
  9. namespace boost { namespace phoenix
  10. {
  11. namespace detail
  12. {
  13. template <typename T>
  14. struct target
  15. {
  16. typedef T type;
  17. };
  18. namespace result_of
  19. {
  20. template <typename T>
  21. struct target
  22. {
  23. typedef
  24. typename proto::detail::uncvref<
  25. typename proto::result_of::value<T>::type
  26. >::type
  27. target_type;
  28. typedef typename target_type::type type;
  29. };
  30. template <typename T>
  31. struct target<T const&>
  32. : target<T>
  33. {};
  34. template <typename T>
  35. struct target<T&>
  36. : target<T>
  37. {};
  38. }
  39. }
  40. }}
  41. #endif