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
4 changes: 1 addition & 3 deletions libcxx/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -738,12 +738,10 @@ set(files
__tuple/tuple_like_no_subrange.h
__tuple/tuple_size.h
__tuple/tuple_types.h
__type_traits/add_const.h
__type_traits/add_cv.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_volatile.h
__type_traits/aligned_storage.h
__type_traits/aligned_union.h
__type_traits/alignment_of.h
Expand Down
32 changes: 0 additions & 32 deletions libcxx/include/__type_traits/add_const.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS add_const {
typedef _LIBCPP_NODEBUG const _Tp type;
};

#if _LIBCPP_STD_VER >= 14
template <class _Tp>
using add_const_t = typename add_const<_Tp>::type;
#endif

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS add_cv {
typedef _LIBCPP_NODEBUG const volatile _Tp type;
Expand All @@ -27,6 +37,16 @@ template <class _Tp>
using add_cv_t = typename add_cv<_Tp>::type;
#endif

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS add_volatile {
typedef _LIBCPP_NODEBUG volatile _Tp type;
};

#if _LIBCPP_STD_VER >= 14
template <class _Tp>
using add_volatile_t = typename add_volatile<_Tp>::type;
#endif

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ADD_CV_H
32 changes: 0 additions & 32 deletions libcxx/include/__type_traits/add_volatile.h

This file was deleted.

1 change: 0 additions & 1 deletion libcxx/include/__type_traits/is_trivially_assignable.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_H

#include <__config>
#include <__type_traits/add_const.h>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_rvalue_reference.h>
#include <__type_traits/integral_constant.h>
Expand Down
5 changes: 1 addition & 4 deletions libcxx/include/__utility/as_const.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
#define _LIBCPP___UTILITY_AS_CONST_H

#include <__config>
#include <__type_traits/add_const.h>
#include <__utility/forward.h>
#include <__utility/move.h>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand All @@ -22,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER >= 17
template <class _Tp>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept {
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Tp& as_const(_Tp& __t) noexcept {
return __t;
}

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/any
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace std {
#include <__memory/allocator_destructor.h>
#include <__memory/allocator_traits.h>
#include <__memory/unique_ptr.h>
#include <__type_traits/add_const.h>
#include <__type_traits/add_cv_quals.h>
#include <__type_traits/add_pointer.h>
#include <__type_traits/aligned_storage.h>
#include <__type_traits/conditional.h>
Expand Down
4 changes: 1 addition & 3 deletions libcxx/include/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,10 @@ module std_core [system] {
}

module type_traits {
module add_const { header "__type_traits/add_const.h" }
module add_cv { header "__type_traits/add_cv.h" }
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_volatile { header "__type_traits/add_volatile.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
4 changes: 1 addition & 3 deletions libcxx/include/type_traits
Original file line number Diff line number Diff line change
Expand Up @@ -425,12 +425,10 @@ namespace std
*/

#include <__config>
#include <__type_traits/add_const.h>
#include <__type_traits/add_cv.h>
#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_volatile.h>
#include <__type_traits/aligned_storage.h>
#include <__type_traits/aligned_union.h>
#include <__type_traits/alignment_of.h>
Expand Down
4 changes: 1 addition & 3 deletions libcxx/include/variant
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,8 @@ namespace std {
#include <__memory/construct_at.h>
#include <__tuple/find_index.h>
#include <__tuple/sfinae_helpers.h>
#include <__type_traits/add_const.h>
#include <__type_traits/add_cv.h>
#include <__type_traits/add_cv_quals.h>
#include <__type_traits/add_pointer.h>
#include <__type_traits/add_volatile.h>
#include <__type_traits/common_type.h>
#include <__type_traits/conditional.h>
#include <__type_traits/conjunction.h>
Expand Down
Loading