remove_all_extents.qbk 1022 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. [/
  2. Copyright 2007 John Maddock.
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt).
  6. ]
  7. [section:remove_all_extents remove_all_extents]
  8. template <class T>
  9. struct remove_all_extents
  10. {
  11. typedef __below type;
  12. };
  13. template <class T> using remove_all_extents_t = typename remove_all_extents<T>::type; // C++11 and above
  14. __type If `T` is an array type, then removes all of the array bounds on `T`, otherwise
  15. leaves `T` unchanged.
  16. __std_ref 8.3.4.
  17. [all_compilers]
  18. __header ` #include <boost/type_traits/remove_all_extents.hpp>` or ` #include <boost/type_traits.hpp>`
  19. [table Examples
  20. [ [Expression] [Result Type]]
  21. [[`remove_all_extents<int>::type`][`int`]]
  22. [[`remove_all_extents<int const[2]>::type`] [`int const`]]
  23. [[`remove_all_extents<int[][2]>::type`] [`int`]]
  24. [[`remove_all_extents<int[2][3][4]>::type`] [`int`]]
  25. [[`remove_all_extents<int const*>::type`] [`int const*`]]
  26. ]
  27. [endsect]