|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-10-18 10:48:02
"David M. Jones" <djones_at_[hidden]> writes:
> Are you telling me that this STL implementation is (slightly) invalid? Or
> are you telling me that I should not expect boost::shared_ptr to be a valid
> type for use as a custom allocator::pointer?
It is the latter. STL implementations are permitted to assume that
an allocator for a type T have pointer and reference types T* and T&
respectively.
20.1.5
4 Implementations of containers described in this International
Standard are permitted to assume that their Allocator template
parameter meets the following two additional requirements beyond
those in Table 32.
--- All instances of a given allocator type are required to be
interchangeable and always compare equal to each other.
--- The typedef members pointer, const_pointer, size_type, and
difference_type are required to be T*, T const*, size_t, and
ptrdiff_t, respectively.
This is sometimes known among committee members as "the weasel
wording."
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk