mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 11:19:02 +08:00
Fix unit test: accessing elements in a deque by offsetting a pointer to another element causes undefined behavior.
(grafted from b35d1a122ec2702cb5e6a262b6d34b3098f998b3 )
This commit is contained in:
parent
83f2c809ed
commit
ed48e38578
@ -48,7 +48,6 @@ void check_stddeque_matrix(const MatrixType& m)
|
|||||||
VERIFY_IS_APPROX(v[21], y);
|
VERIFY_IS_APPROX(v[21], y);
|
||||||
v.push_back(x);
|
v.push_back(x);
|
||||||
VERIFY_IS_APPROX(v[22], 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
|
// do a lot of push_back such that the deque gets internally resized
|
||||||
// (with memory reallocation)
|
// (with memory reallocation)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user