Skip to content

Commit c1a8283

Browse files
authored
[libc++][modules] Move __noexcept_move_assign_container out of __type_traits (#107140)
That header depends on allocator traits, which is fundamentally tied to `<memory>`, not to `<type_traits>`. This breaks a cycle betweeen __type_traits and __memory.
1 parent 7a785d4 commit c1a8283

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

libcxx/include/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ set(files
536536
__memory/construct_at.h
537537
__memory/destruct_n.h
538538
__memory/inout_ptr.h
539+
__memory/noexcept_move_assign_container.h
539540
__memory/out_ptr.h
540541
__memory/pointer_traits.h
541542
__memory/ranges_construct_at.h
@@ -824,7 +825,6 @@ set(files
824825
__type_traits/maybe_const.h
825826
__type_traits/nat.h
826827
__type_traits/negation.h
827-
__type_traits/noexcept_move_assign_container.h
828828
__type_traits/promote.h
829829
__type_traits/rank.h
830830
__type_traits/remove_all_extents.h

libcxx/include/__type_traits/noexcept_move_assign_container.h renamed to libcxx/include/__memory/noexcept_move_assign_container.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef _LIBCPP___TYPE_TRAITS_NOEXCEPT_MOVE_ASSIGN_CONTAINER_H
10-
#define _LIBCPP___TYPE_TRAITS_NOEXCEPT_MOVE_ASSIGN_CONTAINER_H
9+
#ifndef _LIBCPP___MEMORY_NOEXCEPT_MOVE_ASSIGN_CONTAINER_H
10+
#define _LIBCPP___MEMORY_NOEXCEPT_MOVE_ASSIGN_CONTAINER_H
1111

1212
#include <__config>
1313
#include <__memory/allocator_traits.h>
@@ -34,4 +34,4 @@ struct __noexcept_move_assign_container
3434

3535
_LIBCPP_END_NAMESPACE_STD
3636

37-
#endif // _LIBCPP___TYPE_TRAITS_NOEXCEPT_MOVE_ASSIGN_CONTAINER_H
37+
#endif // _LIBCPP___MEMORY_NOEXCEPT_MOVE_ASSIGN_CONTAINER_H

libcxx/include/module.modulemap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,7 @@ module std_private_memory_construct_at [system] { header "__m
15311531
module std_private_memory_destruct_n [system] { header "__memory/destruct_n.h" }
15321532
module std_private_memory_fwd [system] { header "__fwd/memory.h" }
15331533
module std_private_memory_inout_ptr [system] { header "__memory/inout_ptr.h" }
1534+
module std_private_memory_noexcept_move_assign_container [system] { header "__memory/noexcept_move_assign_container.h" }
15341535
module std_private_memory_out_ptr [system] { header "__memory/out_ptr.h" }
15351536
module std_private_memory_pointer_traits [system] { header "__memory/pointer_traits.h" }
15361537
module std_private_memory_ranges_construct_at [system] { header "__memory/ranges_construct_at.h" }
@@ -2023,7 +2024,6 @@ module std_private_type_traits_make_unsigned [system
20232024
module std_private_type_traits_maybe_const [system] { header "__type_traits/maybe_const.h" }
20242025
module std_private_type_traits_nat [system] { header "__type_traits/nat.h" }
20252026
module std_private_type_traits_negation [system] { header "__type_traits/negation.h" }
2026-
module std_private_type_traits_noexcept_move_assign_container [system] { header "__type_traits/noexcept_move_assign_container.h" }
20272027
module std_private_type_traits_promote [system] { header "__type_traits/promote.h" }
20282028
module std_private_type_traits_rank [system] { header "__type_traits/rank.h" }
20292029
module std_private_type_traits_remove_all_extents [system] { header "__type_traits/remove_all_extents.h" }

libcxx/include/string

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ basic_string<char32_t> operator""s( const char32_t *str, size_t len );
609609
#include <__memory/allocator_traits.h>
610610
#include <__memory/compressed_pair.h>
611611
#include <__memory/construct_at.h>
612+
#include <__memory/noexcept_move_assign_container.h>
612613
#include <__memory/pointer_traits.h>
613614
#include <__memory/swap_allocator.h>
614615
#include <__memory_resource/polymorphic_allocator.h>
@@ -629,7 +630,6 @@ basic_string<char32_t> operator""s( const char32_t *str, size_t len );
629630
#include <__type_traits/is_standard_layout.h>
630631
#include <__type_traits/is_trivial.h>
631632
#include <__type_traits/is_trivially_relocatable.h>
632-
#include <__type_traits/noexcept_move_assign_container.h>
633633
#include <__type_traits/remove_cvref.h>
634634
#include <__type_traits/void_t.h>
635635
#include <__utility/auto_cast.h>

libcxx/include/vector

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ template<class T, class charT> requires is-vector-bool-reference<T> // Since C++
334334
#include <__memory/addressof.h>
335335
#include <__memory/allocate_at_least.h>
336336
#include <__memory/allocator_traits.h>
337+
#include <__memory/noexcept_move_assign_container.h>
337338
#include <__memory/pointer_traits.h>
338339
#include <__memory/swap_allocator.h>
339340
#include <__memory/temp_value.h>
@@ -348,7 +349,6 @@ template<class T, class charT> requires is-vector-bool-reference<T> // Since C++
348349
#include <__type_traits/is_allocator.h>
349350
#include <__type_traits/is_constructible.h>
350351
#include <__type_traits/is_nothrow_assignable.h>
351-
#include <__type_traits/noexcept_move_assign_container.h>
352352
#include <__type_traits/type_identity.h>
353353
#include <__utility/exception_guard.h>
354354
#include <__utility/forward.h>

0 commit comments

Comments
 (0)