[Dune-devel] [Dune-Commit] [Commit] dune-common - f78ce3a: [poolallocator, release] Use a non-static memory pool.
Markus Blatt
markus at dr-blatt.de
Sun Feb 9 15:36:13 CET 2014
On Mon, Feb 03, 2014 at 11:45:42AM +0100, Steffen Müthing wrote:
>
>
> On the other hand, they are definitely *not* allowed to be stateful in C++03 (even though, as you point out, most
> library implementations have some support for that).
I did take another look into the standard from 2003. Judging from the
wording I do not share this view. It seems that some allocators (those
used in containers) are more equal than others. See 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.
Implementors are encouraged to supply libraries that can accept
allocators that encapsulate more general
memory models and that support non-equal instances. In such
implementations, any requirements imposed
on allocators by containers beyond those requirements that appear in
Table 32, and the semantics of con-
tainers and algorithms when allocator instances compare non-equal, are
implementation-defined.
"
Markus
--
Do you need more support with DUNE or HPC in general?
Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858 Fax: +49 (0)322 1108991658
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20140209/e762a35d/attachment.sig>
More information about the Dune-devel
mailing list