Debug algos evolution

François Dumont frs.dumont@gmail.com
Mon Dec 2 20:19:00 GMT 2013


On 11/28/2013 10:40 PM, Paolo Carlini wrote:
> Hi
>
>> On 28/nov/2013, at 22:37, François Dumont<frs.dumont@gmail.com>  wrote:
>>
>> Hi
>>
>>     I had no feedback regarding this proposal which I am submiting again. I have completed it to be able to completely remove debug.h from bits/stl_algobase.h.
>>
>>     Do you think it has any interest for libstdc++ ?
> Personally, I think the idea is definitely worth exploring but it's late for 4.9, it has to wait for the next Stage 1.
>
> Paolo
Ok, good to know, I will delay the work on it as I would prefer to 
complete it step by step and not with a single big patch.

I don't know if it is time for this but there will be some questions 
regarding this approach:
- Should I reorder content of files like stl_algobase.h to avoid 
entering/exiting namespaces numerous times. Maybe details at the 
beginning, in __detail namespace, and then the std implementations. If 
we handle it this way it will be done through 2 distinct patches.
- I would prefer debug algos to be limited to user code as internal code 
is normally good and do not require the additional debug checks. It 
means that Internally algos should be called with a _GLIBCXX_STD_A:: 
scope rather than std::. Or perhaps with another macro if you would like 
parallel mode to be active for internal usages or to activate debug mode 
just when working on some library module using algos or containers, 
afair debug mode revealed some issues in regex initial implementation.
- It would be great to add tests for all the debug checks done within an 
algo. It means hundreds of new tests in the testsuite, that's not a 
problem, is it ?

François



More information about the Libstdc++ mailing list