Topic: Allocators and allocation functions, why so many inconsistencies in


Author: Pete Becker <petebecker@acm.org>
Date: Wed, 11 Jul 2001 18:17:04 GMT
Raw View
Kiril Avdeiv wrote:
>
> Can anyone please make sense of this mess for me, why does 3.7.3.1/3
> contradict 18.4.1? One more thing, the class derived from
> std::bad_alloc that 3.7.3.1/3 and 18.4.1 mention, can it be a class
> privately derived from std::bad_alloc? According to the standard it
> can. Does it make sense? NO!!!
>

Clause 3.7.3.1 describes the requirements that the language imposes on
allocation functions, which includes user-defined allocation functions.
Clause 18.4.1 describes the allocation functions that are part of the
standard library. They satisfy the requirements of 3.7.3.1. Functions
that you write may do other things than what the standard ones do, so
long as they, too, meet the requirements of 3.7.3.1.

--
Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)

---
[ 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    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]