[PATCH] D55366: [libcxx] Add checks for unique value of array<T, 0>.begin() and array<T, 0>.end() .
Andrey Maksimov via Phabricator
reviews at reviews.llvm.org
Thu Dec 6 06:40:48 PST 2018
amakc11 updated this revision to Diff 176963.
amakc11 added a comment.
In libc++ these array iterators declared as follows:
typedef value_type* iterator;
typedef const value_type* const_iterator;
The asserts changed to LIBCPP_ASSERTs.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55366/new/
https://reviews.llvm.org/D55366
Files:
test/std/containers/sequences/array/begin.pass.cpp
Index: test/std/containers/sequences/array/begin.pass.cpp
===================================================================
--- test/std/containers/sequences/array/begin.pass.cpp
+++ test/std/containers/sequences/array/begin.pass.cpp
@@ -40,6 +40,11 @@
typedef NoDefault T;
typedef std::array<T, 0> C;
C c = {};
- assert(c.begin() == c.end());
+ C::iterator ib, ie;
+ ib = c.begin();
+ ie = c.end();
+ assert(ib == ie);
+ LIBCPP_ASSERT(ib != nullptr);
+ LIBCPP_ASSERT(ie != nullptr);
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55366.176963.patch
Type: text/x-patch
Size: 552 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181206/884a7247/attachment.bin>
More information about the libcxx-commits
mailing list