9
3

decay_array.hpp 758 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2005 Daniel Wallin.
  2. // Copyright 2005 Joel de Guzman.
  3. //
  4. // Use, modification and distribution is subject to the Boost Software
  5. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. // Modeled after range_ex, Copyright 2004 Eric Niebler
  9. #ifndef BOOST_PHOENIX_ALGORITHM_DETAIL_DECAY_ARRAY_HPP
  10. #define BOOST_PHOENIX_ALGORITHM_DETAIL_DECAY_ARRAY_HPP
  11. namespace boost { namespace phoenix {
  12. namespace detail
  13. {
  14. template<typename T>
  15. struct decay_array
  16. {
  17. typedef T type;
  18. };
  19. template<typename T, int N>
  20. struct decay_array<T[N]>
  21. {
  22. typedef T* type;
  23. };
  24. template<typename T, int N>
  25. struct decay_array<T (&)[N]>
  26. {
  27. typedef T* type;
  28. };
  29. }
  30. }}
  31. #endif