Keep std::deque algos specializations in Debug mode
François Dumont
frs.dumont@gmail.com
Sat Aug 25 20:44:00 GMT 2018
The last optimizations that get disabled when Debug mode is enable are
the algo specializations for std::deque iterators.
This patch move those algos in std namespace as they should even when
Debug mode is enable so that they get considered even when calls are
made with the namespace qualification. And it adds all the algos Debug
implementations which forward to normal implementations to benefit from
optimizations.
Note that I try to use typename deque<>::iterator or typename
deque<>::const_iterator to define Debug algos but it didn't work, gcc
was just not considering those overloads. I wonder why ?
I added test and manually checked that behavior was correct. Do you see
a way to automate this validation ?
François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deque_debug_algos.patch
Type: text/x-patch
Size: 30251 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20180825/84568f7e/attachment.bin>
More information about the Libstdc++
mailing list