[PATCH] Make ex::operator[] const dispatch to basic::operator[] const.
authorRichard Kreckel <kreckel@ginac.de>
Mon, 5 Apr 2021 18:46:55 +0000 (20:46 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Mon, 5 Apr 2021 19:06:41 +0000 (21:06 +0200)
commit7805dc0c2358b7774ad08cd443cd945cbd940749
tree486da18e6a63fc668e3c549486acfcae49c6da5c
parentbe11202909f8014b213065ca85272af403a530f1
[PATCH] Make ex::operator[] const dispatch to basic::operator[] const.

It turned out that ex::operator[] const dispatched to non-const
basic::operator[] because
* member variable ex::bp is non-const and
* ptr<T>::operator*() returns a non-const T &.

As a result, indexing failed for multiply referenced objects.

Thanks to Vitaly Magerya <vmagerya@gmail.com> for reporting this.
check/exam_paranoia.cpp
ginac/ex.h