Skip to content
Snippets Groups Projects
Commit 452476db authored by Jonathan Wakely's avatar Jonathan Wakely
Browse files

libstdc++: Fix std::deque::operator[] Xmethod [PR112491]

The Xmethod for std::deque::operator[] has the same bug that I recently
fixed for the std::deque::size() Xmethod. The first node might have
unused capacity at the start, which needs to be accounted for when
indexing into the deque.

libstdc++-v3/ChangeLog:

	PR libstdc++/112491
	* python/libstdcxx/v6/xmethods.py (DequeWorkerBase.index):
	Correctly handle unused capacity at the start of the first node.
	* testsuite/libstdc++-xmethods/deque.cc: Check index operator
	when elements have been removed from the front.
parent cbd0fe22
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment