This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [libstdc++ PATCH] libstdc++ debug mode
- From: "Gawain Bolton" <gp dot bolton at computer dot org>
- To: "Doug Gregor" <dgregor at apple dot com>
- Cc: <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 17 Jul 2003 10:38:00 +0100
- Subject: Re: [libstdc++ PATCH] libstdc++ debug mode
- References: <E608DE1C-B656-11D7-9E1F-00039354D67A@apple.com>
I think the debug mode patch you are proposing for libstdc++ is great. I
would even say it is essential given the number of misuses of the C++
standard library I have seen! I especially like how iterators are
automatically invalidated when performing operations which invalidate them.
I have a few questions though:
1. Why do you provide trivial destructors? (For example: "~deque()
{ }").
2. Can a program (executable) be compiled with some parts using the
debug version of libsdtc++ and others the nominal verson?
2.1 Along the same lines, but pushing things further, how could one
have debug mode turned on for a specific container type (eg. std::list) or
variable (e.g. just for variable "foo" of type std::map in bar()?
Given the size of programs today and the code bloat which occurs with
templates, I think that it is essential to be able to specify where
debugging is turned on.
Cheers,
Gawain