Debug algorithms
François Dumont
frs.dumont@gmail.com
Wed Jun 22 20:05:00 GMT 2016
Hi
Here is eventually the so long promized patch to introduce Debug
algos similarly to Debug containers.
Why such an evolution:
- More flexibility, debug algos can be used explicitely without
activating Debug mode.
- Performance: Debug algos can get rid of Debug layer on top of
container iterators to invoke normal algos. Operations on normal
iterators are faster and we also benefit from the same algos
specialization that sometimes exist on some container iterators (like
std::deque ones). Also normal algos are now using other normal algos,
Debug check won't be done several times.
- It will be easier to implement new Debug checks without the limitation
to do so through some Debug macro
To do so I introduced a new namespace __cxx1998_a used for normal
algos when Debug mode is active. I couldn't reuse __cxx1998 cause with
current implementation of Debug containers __cxx1998 is exposed and
because of ADL we could then have ambiguity between Debug and normal
versions of the same algos. I also introduced a __std_a namespace which
control the kind of algos used within the library mostly for containers
implementation details.
Patch is compressed as it is quite big.
Tested under Linux x86_64 normal and debug modes.
François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_algos.patch.bz2
Type: application/x-bzip2
Size: 44436 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160622/9dc11692/attachment.bz2>
More information about the Gcc-patches
mailing list