tuple_like_ext.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef _LIBCPP___TUPLE_TUPLE_LIKE_EXT_H
  9. #define _LIBCPP___TUPLE_TUPLE_LIKE_EXT_H
  10. #include <__config>
  11. #include <__fwd/array.h>
  12. #include <__fwd/pair.h>
  13. #include <__fwd/tuple.h>
  14. #include <__tuple/tuple_types.h>
  15. #include <__type_traits/integral_constant.h>
  16. #include <cstddef>
  17. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  18. # pragma GCC system_header
  19. #endif
  20. _LIBCPP_BEGIN_NAMESPACE_STD
  21. template <class _Tp> struct __tuple_like_ext : false_type {};
  22. template <class _Tp> struct __tuple_like_ext<const _Tp> : public __tuple_like_ext<_Tp> {};
  23. template <class _Tp> struct __tuple_like_ext<volatile _Tp> : public __tuple_like_ext<_Tp> {};
  24. template <class _Tp> struct __tuple_like_ext<const volatile _Tp> : public __tuple_like_ext<_Tp> {};
  25. #ifndef _LIBCPP_CXX03_LANG
  26. template <class... _Tp> struct __tuple_like_ext<tuple<_Tp...> > : true_type {};
  27. #endif
  28. template <class _T1, class _T2> struct __tuple_like_ext<pair<_T1, _T2> > : true_type {};
  29. template <class _Tp, size_t _Size> struct __tuple_like_ext<array<_Tp, _Size> > : true_type {};
  30. template <class... _Tp> struct __tuple_like_ext<__tuple_types<_Tp...> > : true_type {};
  31. _LIBCPP_END_NAMESPACE_STD
  32. #endif // _LIBCPP___TUPLE_TUPLE_LIKE_EXT_H