diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-02-12 15:31:16 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-02-12 15:31:16 +0100 |
commit | b35d1a122ec2702cb5e6a262b6d34b3098f998b3 (patch) | |
tree | c7b04bf5d8b33a0f63202fcae3f07e4812705e18 | |
parent | 9e3f3a2d272d6efa6845cd560da1a5546f93ff61 (diff) |
Fix unit test: accessing elements in a deque by offsetting a pointer to another element causes undefined behavior.
-rw-r--r-- | test/stddeque_overload.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/test/stddeque_overload.cpp b/test/stddeque_overload.cpp index d887e35ba..4da618bbf 100644 --- a/test/stddeque_overload.cpp +++ b/test/stddeque_overload.cpp @@ -48,7 +48,6 @@ void check_stddeque_matrix(const MatrixType& m) VERIFY_IS_APPROX(v[21], y); v.push_back(x); VERIFY_IS_APPROX(v[22], x); - VERIFY((size_t)&(v[22]) == (size_t)&(v[21]) + sizeof(MatrixType)); // do a lot of push_back such that the deque gets internally resized // (with memory reallocation) |