[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 10:33:19 PST 2018
amakc11 updated this revision to Diff 177006.
amakc11 added a comment.
Sorry. Fixed.
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
@@ -14,6 +14,8 @@
#include <array>
#include <cassert>
+#include "test_macros.h"
+
// std::array is explicitly allowed to be initialized with A a = { init-list };.
// Disable the missing braces warning for this reason.
#include "disable_missing_braces_warning.h"
@@ -40,6 +42,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.177006.patch
Type: text/x-patch
Size: 821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181206/70ffc17a/attachment.bin>
More information about the libcxx-commits
mailing list