Debug functions review
François Dumont
frs.dumont@gmail.com
Thu Oct 24 19:23:00 GMT 2013
On 10/24/2013 12:12 AM, Paolo Carlini wrote:
> On 10/23/2013 11:22 PM, François Dumont wrote:
>> You are right, I am preparing a test case. However you have to know
>> that __check_dereferenceable is simply not used for the moment. It is
>> only because I have started using it for a debug mode evolution that
>> I discovered the issue.
> Ok, thanks. Now however I'm curious to know the story of
> __check_dereferenceable: dates back to when Doug added debug-mode and
> never used since? Any idea?
>
> Paolo.
>
Don't know __check_dereferenceable story, nothing in ChangeLogs.
Here is my new proposal with tests. I finally restore
__check_singular_aux, don't know why __check_singular(const
_Safe_Iterator<>&) didn't work. I even completely removed it as
__check_singular_aux works well for all kind of safe iterators
inheriting from _Safe_iterator_base.
2013-10-24 François Dumont <fdumont@gcc.gnu.org>
* include/debug/formatter.h (__check_singular): Add const on
iterator reference.
* include/debug/functions.h (__check_singular): Likewise.
(__check_singular(const _Safe_iterator<_Ite, _Seq>&)): Delete.
(__check_dereferenceable(const _Ite&)): Add const on iterator
reference.
(__check_dereferenceable(const _Safe_local_iterator<>&)): New.
* include/debug/safe_iterator.h (__check_singular_aux): Review
comment.
* testsuite/23_containers/vector/debug/debug_functions.cc: New.
* testsuite/23_containers/unordered_set/debug/debug_functions.cc:
New.
Tested under Linux x86_64, normal and debug mode.
Ok to commit ?
François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_functions.patch
Type: text/x-patch
Size: 8304 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20131024/f45f2aff/attachment.bin>
More information about the Libstdc++
mailing list