Skip to content

Commit 01ebdf7

Browse files
committed
rebase
1 parent 2c2542e commit 01ebdf7

File tree

8 files changed

+7
-74
lines changed

8 files changed

+7
-74
lines changed

libcxx/include/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,6 @@ set(files
357357
__filesystem/recursive_directory_iterator.h
358358
__filesystem/space_info.h
359359
__filesystem/u8path.h
360-
__flat_map/container_traits.h
361360
__flat_map/flat_map.h
362361
__flat_map/sorted_unique.h
363362
__format/buffer.h

libcxx/include/__flat_map/container_traits.h

-46
This file was deleted.

libcxx/include/__flat_map/flat_map.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include <__concepts/convertible_to.h>
2424
#include <__concepts/swappable.h>
2525
#include <__config>
26-
#include <__flat_map/container_traits.h>
2726
#include <__flat_map/sorted_unique.h>
2827
#include <__functional/invoke.h>
2928
#include <__functional/is_transparent.h>
@@ -43,6 +42,7 @@
4342
#include <__ranges/subrange.h>
4443
#include <__ranges/zip_view.h>
4544
#include <__type_traits/conjunction.h>
45+
#include <__type_traits/container_traits.h>
4646
#include <__type_traits/invoke.h>
4747
#include <__type_traits/is_allocator.h>
4848
#include <__type_traits/is_nothrow_constructible.h>

libcxx/include/deque

-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ template <class T, class Allocator, class Predicate>
194194
#include <__assert>
195195
#include <__config>
196196
#include <__debug_utils/sanitizers.h>
197-
#include <__flat_map/container_traits.h>
198197
#include <__format/enable_insertable.h>
199198
#include <__fwd/deque.h>
200199
#include <__iterator/distance.h>

libcxx/include/flat_map

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ namespace std {
3939

4040
#include <__assert> // all public C++ headers provide the assertion handler
4141
#include <__config>
42-
#include <__flat_map/container_traits.h>
4342
#include <__flat_map/flat_map.h>
4443
#include <__flat_map/sorted_unique.h>
4544
#include <version>

libcxx/include/module.modulemap

+1-1
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ module std [system] {
12251225
module flat_map { header "__flat_map/flat_map.h" }
12261226
module sorted_unique { header "__flat_map/sorted_unique.h" }
12271227

1228-
head "flat_map"
1228+
header "flat_map"
12291229
export *
12301230
}
12311231

libcxx/include/vector

-18
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ template<class T, class charT> requires is-vector-bool-reference<T> // Since C++
323323
#include <__concepts/same_as.h>
324324
#include <__config>
325325
#include <__debug_utils/sanitizers.h>
326-
#include <__flat_map/container_traits.h>
327326
#include <__format/enable_insertable.h>
328327
#include <__format/formatter.h>
329328
#include <__format/formatter_bool.h>
@@ -3006,23 +3005,6 @@ public:
30063005
return __underlying_.format(__ref, __ctx);
30073006
}
30083007
};
3009-
3010-
template <class _Tp, class _Allocator>
3011-
inline constexpr bool __is_stl_container<vector<_Tp, _Allocator>> = true;
3012-
3013-
template <class _Tp, class _Allocator>
3014-
struct __container_traits<vector<_Tp, _Allocator>> {
3015-
// http://eel.is/c++draft/vector.modifiers#2
3016-
// If an exception is thrown other than by the copy constructor, move constructor, assignment operator, or move
3017-
// assignment operator of T or by any InputIterator operation, there are no effects. If an exception is thrown while
3018-
// inserting a single element at the end and T is Cpp17CopyInsertable or is_nothrow_move_constructible_v<T> is true,
3019-
// there are no effects. Otherwise, if an exception is thrown by the move constructor of a non-Cpp17CopyInsertable T,
3020-
// the effects are unspecified.
3021-
static constexpr bool __emplacement_has_strong_exception_safety_guarantee =
3022-
is_nothrow_move_constructible_v<_Tp> ||
3023-
__is_cpp17_copy_insertable<typename vector<_Tp, _Allocator>::allocator_type>::value;
3024-
};
3025-
30263008
#endif // _LIBCPP_STD_VER >= 23
30273009

30283010
template <class _Tp, class _Allocator>

libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/move.pass.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ int main(int, char**) {
3939

4040
assert(mo.empty());
4141
assert(mo.key_comp() == C(5));
42-
assert(mo.keys().get_allocator() == A(test_alloc_base::moved_value));
43-
assert(mo.values().get_allocator() == A(test_alloc_base::moved_value));
42+
assert(mo.keys().get_allocator().get_id() == test_alloc_base::moved_value);
43+
assert(mo.values().get_allocator().get_id() == test_alloc_base::moved_value);
4444
}
4545
{
4646
using C = test_less<int>;
@@ -76,9 +76,9 @@ int main(int, char**) {
7676
{
7777
// moved-from object maintains invariant if one of underlying container does not clear after move
7878
using M = std::flat_map<int, int, std::less<>, std::vector<int>, CopyOnlyVector<int>>;
79-
M m1 = M({1,2,3},{1,2,3});
80-
M m2 = std::move(m1);
81-
assert(m2.size()==3);
79+
M m1 = M({1, 2, 3}, {1, 2, 3});
80+
M m2 = std::move(m1);
81+
assert(m2.size() == 3);
8282
assert(m1.keys().size() == m1.values().size());
8383
LIBCPP_ASSERT(m1.empty());
8484
LIBCPP_ASSERT(m1.keys().size() == 0);

0 commit comments

Comments
 (0)