Topic: class basic_string<>
Author: "Nathan Myers, http://www.cantrip.org/" <ncm@cantrip.org>
Date: 1996/03/20 Raw View
Rich Paul <rpaul@trcinc.com> wrote:
> I am currently implementing, from the working paper, class
> basic_string. ...
> before calling traits::deallocate, should I
> explicitly call destructors on the charT's in my array, since it
> may be a class type, or does the definition of charT as being
> 'char-like' preclude this?
(I assume Paul means Allocator::deallocate.)
The requirements on a character type used as an element
of a string certainly should be documented, at least as
well as are other template parameters in the Draft. As
I recall, this was an open issue for the Strings chapter,
but the expectation was that characters would be assumed to
to have (at most) ignorable constructors and destructors.
I have some good news and bad news for Paul ...
The bad news is that the traits and allocator interfaces were
both changed at the March '96 meeting. The good news is that
both are considerably simpler than before.
Nathan Myers
ncm@cantrip.org http://www.cantrip.org/
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]