sp_if_array.hpp 818 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2012 Glen Joseph Fernandes
  3. * glenfe at live dot com
  4. *
  5. * Distributed under the Boost Software License,
  6. * Version 1.0. (See accompanying file LICENSE_1_0.txt
  7. * or copy at http://boost.org/LICENSE_1_0.txt)
  8. */
  9. #ifndef BOOST_SMART_PTR_DETAIL_SP_IF_ARRAY_HPP
  10. #define BOOST_SMART_PTR_DETAIL_SP_IF_ARRAY_HPP
  11. #include <boost/smart_ptr/shared_ptr.hpp>
  12. namespace boost {
  13. namespace detail {
  14. template<typename T>
  15. struct sp_if_array;
  16. template<typename T>
  17. struct sp_if_array<T[]> {
  18. typedef boost::shared_ptr<T[]> type;
  19. };
  20. template<typename T>
  21. struct sp_if_size_array;
  22. template<typename T, std::size_t N>
  23. struct sp_if_size_array<T[N]> {
  24. typedef boost::shared_ptr<T[N]> type;
  25. };
  26. }
  27. }
  28. #endif