Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions libcxx/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -778,9 +778,8 @@ set(files
__tuple/tuple_size.h
__tuple/tuple_types.h
__type_traits/add_cv_quals.h
__type_traits/add_lvalue_reference.h
__type_traits/add_pointer.h
__type_traits/add_rvalue_reference.h
__type_traits/add_reference.h
__type_traits/aligned_storage.h
__type_traits/aligned_union.h
__type_traits/alignment_of.h
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__concepts/common_with.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <__concepts/common_reference_with.h>
#include <__concepts/same_as.h>
#include <__config>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_reference.h>
#include <__type_traits/common_reference.h>
#include <__type_traits/common_type.h>
#include <__utility/declval.h>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__memory/shared_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <__memory/shared_count.h>
#include <__memory/uninitialized_algorithms.h>
#include <__memory/unique_ptr.h>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_reference.h>
#include <__type_traits/conditional.h>
#include <__type_traits/conjunction.h>
#include <__type_traits/disjunction.h>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__memory/unique_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <__memory/auto_ptr.h>
#include <__memory/compressed_pair.h>
#include <__memory/pointer_traits.h>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_reference.h>
#include <__type_traits/common_type.h>
#include <__type_traits/conditional.h>
#include <__type_traits/dependent_type.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_ADD_LVALUE_REFERENCE_H
#define _LIBCPP___TYPE_TRAITS_ADD_LVALUE_REFERENCE_H
#ifndef _LIBCPP___TYPE_TRAITS_ADD_REFERENCE_H
#define _LIBCPP___TYPE_TRAITS_ADD_REFERENCE_H

#include <__config>

Expand Down Expand Up @@ -35,6 +35,24 @@ template <class _Tp>
using add_lvalue_reference_t = __add_lvalue_reference_t<_Tp>;
#endif

template <class _Tp>
struct _LIBCPP_NO_SPECIALIZATIONS add_rvalue_reference {
using type _LIBCPP_NODEBUG = __add_rvalue_reference(_Tp);
};

#ifdef _LIBCPP_COMPILER_GCC
template <class _Tp>
using __add_rvalue_reference_t _LIBCPP_NODEBUG = typename add_rvalue_reference<_Tp>::type;
#else
template <class _Tp>
using __add_rvalue_reference_t _LIBCPP_NODEBUG = __add_rvalue_reference(_Tp);
#endif

#if _LIBCPP_STD_VER >= 14
template <class _Tp>
using add_rvalue_reference_t = __add_rvalue_reference_t<_Tp>;
#endif

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ADD_LVALUE_REFERENCE_H
#endif // _LIBCPP___TYPE_TRAITS_ADD_REFERENCE_H
40 changes: 0 additions & 40 deletions libcxx/include/__type_traits/add_rvalue_reference.h

This file was deleted.

3 changes: 1 addition & 2 deletions libcxx/include/__type_traits/copy_cvref.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#define _LIBCPP___TYPE_TRAITS_COPY_CVREF_H

#include <__config>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_rvalue_reference.h>
#include <__type_traits/add_reference.h>
#include <__type_traits/copy_cv.h>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
3 changes: 1 addition & 2 deletions libcxx/include/__type_traits/is_assignable.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#define _LIBCPP___TYPE_TRAITS_IS_ASSIGNABLE_H

#include <__config>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_rvalue_reference.h>
#include <__type_traits/add_reference.h>
#include <__type_traits/integral_constant.h>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
21 changes: 5 additions & 16 deletions libcxx/include/__type_traits/is_bounded_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define _LIBCPP___TYPE_TRAITS_IS_BOUNDED_ARRAY_H

#include <__config>
#include <__cstddef/size_t.h>
#include <__type_traits/integral_constant.h>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand All @@ -19,26 +18,16 @@

_LIBCPP_BEGIN_NAMESPACE_STD

template <class>
inline const bool __is_bounded_array_v = false;
template <class _Tp, size_t _Np>
inline const bool __is_bounded_array_v<_Tp[_Np]> = true;
template <class _Tp>
inline const bool __is_bounded_array_v = __is_bounded_array(_Tp);

#if _LIBCPP_STD_VER >= 20

template <class>
struct _LIBCPP_NO_SPECIALIZATIONS is_bounded_array : false_type {};

_LIBCPP_DIAGNOSTIC_PUSH
# if __has_warning("-Winvalid-specialization")
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Winvalid-specialization")
# endif
template <class _Tp, size_t _Np>
struct is_bounded_array<_Tp[_Np]> : true_type {};
_LIBCPP_DIAGNOSTIC_POP
template <class _Tp>
struct _LIBCPP_NO_SPECIALIZATIONS is_bounded_array : bool_constant<__is_bounded_array(_Tp)> {};

template <class _Tp>
_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_bounded_array_v = is_bounded_array<_Tp>::value;
_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_bounded_array_v = __is_bounded_array(_Tp);

#endif

Expand Down
3 changes: 1 addition & 2 deletions libcxx/include/__type_traits/is_constructible.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#define _LIBCPP___TYPE_IS_CONSTRUCTIBLE_H

#include <__config>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_rvalue_reference.h>
#include <__type_traits/add_reference.h>
#include <__type_traits/integral_constant.h>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
3 changes: 1 addition & 2 deletions libcxx/include/__type_traits/is_nothrow_assignable.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_H

#include <__config>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_rvalue_reference.h>
#include <__type_traits/add_reference.h>
#include <__type_traits/integral_constant.h>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
3 changes: 1 addition & 2 deletions libcxx/include/__type_traits/is_nothrow_constructible.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_H

#include <__config>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_rvalue_reference.h>
#include <__type_traits/add_reference.h>
#include <__type_traits/integral_constant.h>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__type_traits/is_swappable.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <__config>
#include <__cstddef/size_t.h>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_reference.h>
#include <__type_traits/enable_if.h>
#include <__type_traits/integral_constant.h>
#include <__type_traits/is_assignable.h>
Expand Down
3 changes: 1 addition & 2 deletions libcxx/include/__type_traits/is_trivially_assignable.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_H

#include <__config>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_rvalue_reference.h>
#include <__type_traits/add_reference.h>
#include <__type_traits/integral_constant.h>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
3 changes: 1 addition & 2 deletions libcxx/include/__type_traits/is_trivially_constructible.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_CONSTRUCTIBLE_H

#include <__config>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_rvalue_reference.h>
#include <__type_traits/add_reference.h>
#include <__type_traits/integral_constant.h>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/memory
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public:
# include <__cstddef/size_t.h>
# include <__functional/hash.h>
# include <__functional/operations.h>
# include <__type_traits/add_lvalue_reference.h>
# include <__type_traits/add_pointer.h>
# include <__type_traits/add_reference.h>
# include <__type_traits/common_type.h>
# include <__type_traits/enable_if.h>
# include <__type_traits/is_convertible.h>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/future
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
# include <__system_error/error_code.h>
# include <__system_error/error_condition.h>
# include <__thread/thread.h>
# include <__type_traits/add_lvalue_reference.h>
# include <__type_traits/add_reference.h>
# include <__type_traits/aligned_storage.h>
# include <__type_traits/conditional.h>
# include <__type_traits/decay.h>
Expand Down
3 changes: 1 addition & 2 deletions libcxx/include/module.modulemap.in
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ module std_core [system] {

module type_traits {
module add_cv_quals { header "__type_traits/add_cv_quals.h" }
module add_lvalue_reference { header "__type_traits/add_lvalue_reference.h" }
module add_pointer { header "__type_traits/add_pointer.h" }
module add_rvalue_reference { header "__type_traits/add_rvalue_reference.h" }
module add_reference { header "__type_traits/add_reference.h" }
module aligned_storage { header "__type_traits/aligned_storage.h" }
module aligned_union { header "__type_traits/aligned_union.h" }
module alignment_of { header "__type_traits/alignment_of.h" }
Expand Down
3 changes: 1 addition & 2 deletions libcxx/include/type_traits
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,8 @@ namespace std
#else
# include <__config>
# include <__type_traits/add_cv_quals.h>
# include <__type_traits/add_lvalue_reference.h>
# include <__type_traits/add_pointer.h>
# include <__type_traits/add_rvalue_reference.h>
# include <__type_traits/add_reference.h>
# include <__type_traits/aligned_storage.h>
# include <__type_traits/aligned_union.h>
# include <__type_traits/alignment_of.h>
Expand Down
Loading