From -8589755864230265166
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,305abf126cd51bfd
X-Google-Attributes: gidf78e5,public
From: steagall@deltalogic.com (Bob Steagall)
Subject: Re: implementing persistence with std library
Date: 1997/07/29
Message-ID: <33de02bf.4910020@news.apk.net>#1/1
X-Deja-AN: 260219642
References: <Pine.OSF.3.95.970727205125.29997A-100000@gonzo.wolfenet.com> <fxtd8o2lwrc.fsf@isolde.mti.sgi.com>
X-Original-Date: Tue, 29 Jul 1997 15:12:12 GMT
Organization: DeltaLogic, Inc.
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBM94Y9Uy4NqrwXLNJAQHsPwH9GAag3H4VZTpLVFqy01gB+BhVyUws0406 iQ7XQGbYSKDh0WJ/Nvts+0f/Rb8UlZwmbAGNIvrjm+vygMNE20m2Sw== =dzop
Reply-To: steagall@deltalogic.com
Newsgroups: comp.std.c++
Originator: austern@isolde.mti.sgi.com


Matt Austern <austern@sgi.com> wrote:

>No, it doesn't precisely conform to the draft standard.
>
>One problem is that allocators as defined in the draft standard are
>unimplementable without member templates (take a look at the "rebind"
>member), and compilers that support member templates are still
>uncommon.  The SGI implementation uses a design that doesn't require
>member templates.
>
>The situation with member-specific data in the draft standard is a bit
>more complicated.  What it boils down to is that allocators in the
>draft are allowed to have non-static member functions, but standard
>containers are allowed to assume that they have no member-specific
>data.  Containers, as defined in the draft, are allowed to act as if
>all allocators of the same type are interchangeable.

Hmm, unless I am misreading CD2, I think the last statement should be a
little stronger.  Containers, as defined in the draft, are (implicitly)
*required* to act as if all allocators of the same type are
interchangeable.  This precludes precisely conforming standard library
containers from having/using per-instance private pools of memory.  

While private pools are something you won't want to use all the time,
when you do need them, they can be tremendously faster than shared
pools.

The XTL implementation extends the allocators and containers to permit
private pools, and do the right thing when they are used.

--Bob

====================================================================
Bob Steagall                                 steagall@deltalogic.com
DeltaLogic, Inc.                           http://www.deltalogic.com
1537 Kew Road                                   Voice (216) 321-8200
Cleveland Hts, OH 44118-1204                    Fax   (216) 321-6976
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]



