220 34947 <4aa86771-6ade-02fa-b77e-6f0e33f230ac@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: =?UTF-8?Q?Jonathan_M=c3=bcller?= <jonathanmueller.dev@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Idea about "std::pmr::memory_resource"
Date: Sun, 15 Oct 2017 18:27:39 +0200
Lines: 51
Approved: news@gmane.org
Message-ID: <4aa86771-6ade-02fa-b77e-6f0e33f230ac@gmail.com>
References: <0a8293b4-3246-47a5-9881-bc1ca4b91772@isocpp.org>
 <CAEddoJZzSZ5RROJ6Uu=2+R90mXi+hnHPDCxobrHM2daM6AxPVw@mail.gmail.com>
 <60cbae8d-2a6d-4d1b-9fdf-5c4c913ee0a0@isocpp.org>
 <97632d14-327a-4af6-8e55-35e753f9557c@isocpp.org>
 <18b21c5c-ab0f-51ed-1b00-d0cda5c7c046@gmail.com>
 <5accfbfb-91b3-489e-9e2d-b82149b5ce8e@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1508084866 9124 195.159.176.226 (15 Oct 2017 16:27:46 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 15 Oct 2017 16:27:46 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.4.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCUMHC4Z6QGBB7MYR3HQKGQERJ4ETUY@isocpp.org Sun Oct 15 18:27:41 2017
Return-path: <std-proposals+bncBCUMHC4Z6QGBB7MYR3HQKGQERJ4ETUY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f71.google.com ([74.125.82.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCUMHC4Z6QGBB7MYR3HQKGQERJ4ETUY@isocpp.org>)
	id 1e3llG-0000vI-Br
	for gclcip-std-proposals@m.gmane.org; Sun, 15 Oct 2017 18:27:34 +0200
Original-Received: by mail-wm0-f71.google.com with SMTP id s78sf7558553wmd.14
        for <gclcip-std-proposals@m.gmane.org>; Sun, 15 Oct 2017 09:27:42 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1508084862; cv=pass;
        d=google.com; s=arc-20160816;
        b=bpZA/TXunl6NEGEzwNJlunbmXTcLXWTP+XRPEJ/agmpeuWDV2K2UZztv7FlAeJvwEr
         FGvGkk+mMboFB/vj21ziLIcKbnqHAvq06o8dgofBc2faEeqmOP/jXq1MguE7qRuDccIc
         naRoS+IdbRcLmrDoDNHQO/xEHiGtQ331SGn0VZQcYIhtQi4u9gEdjr6007dH9y/8AHEh
         W/kE2tAN8Me5VnCqZP34J7izjWUPEO2bYXLnio0as6HaUvcVi6Sy8uj0yXZxy1ipdzWs
         egmtBBB6/Hdn84CwqDH5BLJYeTpM+Ui5rL4Mh3w7IenEvTA2JL8MVt0ALS7m+HJTk3mg
         oW/w==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-transfer-encoding
         :content-language:in-reply-to:mime-version:user-agent:date
         :message-id:from:references:to:subject:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=yJjYSlI8KUwjeoclSuuhSBICuDlF3JuhzpIhM/K5x8k=;
        b=iC+MXhSEg/DgDXYQ91mLWPTY7fpsVhMG3B4pfS5dH61CpJuRHL6wH6OT7Xo9RhfYBi
         lziZPwXh52XrLjmbkjhhFcsSlNQzVFKh9eaayBrvzshd03COIV3xDyfQOEd3mgWpgD8+
         L0CmJi7Z83Bltgc0u5nEjsx/HnhGqONV3hlZuBC/pSHAVgJMo1TYbgjinPA0A1oJI50c
         EYdUKKdyfGOcDb4R7X/1ifvPCqaL17+T1NsPV3nJhHqNYTvc9fG8rxt0hBD/q0gMZ1mb
         G250j9j4QHPi3+Ola9QFZOlTRYxoFsy5lNa+ylAiM4auEs4vY64KCzgr6Sl5pN 
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=b5YWcYf3;
       spf=pass (google.com: domain of jonathanmueller.dev@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jonathanmueller.dev@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-to:content-language:content-transfer-encoding
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=yJjYSlI8KUwjeoclSuuhSBICuDlF3JuhzpIhM/K5x8k=;
        b=lkYCcxbIUdEnRwRtIXS/LaUlsiwS+Sl9ylXTOLbc6gYkg+dAFQBJ1dNks2hhIr2+Ub
         jBiGZD1xqwci1v90p2wbE1skjTKsR0Nal5vE85F8UCNyksOrDURyq8l9drChUO+LQd+f
         HqgwNsDz92L5vB7jMgKUj24/fm6LCKQXdB4p3gKRlSclRUs0C3PBTIF1UN5tWs0Z/x4z
         UWQ77H+6FS0iSPsknFIES/GNN2kjfHWPkw8h2hc4Gudr4o8gaN8vyNtWRVGjF67OIpno
         7dNPAKV/Y+stiE4EaXHrFdzUIyLH6lkrqh3ix/ivJsggf9eUfCGfkaf1mlSvZukdtIPZ
         KY+ 
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to:content-language
         :content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=yJjYSlI8KUwjeoclSuuhSBICuDlF3JuhzpIhM/K5x8k=;
        b=RQC8qJYUAd58HTOOm+4oJuPZXGYzdBVCMMI3e2wRvMlMAFvMTaayqaIxpZy+ZDEv8x
         a97hoZ0qUw+Vgxptuv/kd7OrFSoq0CF2kpdjzpCp4wp8CDLPX8JPcvy2MuBe3JPYOpx0
         QgQVedKoHx+PcwcjoXLnIbVBEJy2VJ/2Dc/Msqcmri83P8QT8HkbaAOewG2aoLgBOGHf
         ke6v7kUNGqXcoax9aYMo4Zfea0lpPuuhGMCSbmQOZxb8IDwZH81vYAAPh2O46hgQCvUv
         uqEvp+7GwcqnpnHXzZchBKCOq8Ze+lfuyEpsJp5ZvqM 
X-Gm-Message-State: AMCzsaVlQLRgY832EhIIsVCIzYFA9OCbDbTGxeLc/EWHe0HY1OggNJWI
	1VBddzJDZd4KzzpHIeuq0Ok8cg==
X-Google-Smtp-Source: AOwi7QBE1HP4OFfHhP+PRabZcPEZ5tKqbgNYEjVgWeEOIBVz8KR3yCnrM6UT9VYogB5vvcGhNoHTKw==
X-Received: by 10.80.204.74 with SMTP id n10mr1832513edi.2.1508084861986;
        Sun, 15 Oct 2017 09:27:41 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.80.146.172 with SMTP id k41ls1741618eda.2.gmail; Sun, 15 Oct
 2017 09:27:41 -0700 (PDT)
X-Received: by 10.80.135.219 with SMTP id 27mr9995443edz.203.1508084861135;
        Sun, 15 Oct 2017 09:27:41 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1508084861; cv=none;
        d=google.com; s=arc-20160816;
        b=oevakMHvv9dqwKCX6YUOjtRut80t/ijd1EAdbfacqnDjbQ+M+p8dWUL1kU2+fw0oke
         NtZpe/lHm4DYUexuPilSdMGB/P1vGTu/Rcc43APWo9pywvZl8Zb+Ysm90yEzAzjBmDZA
         R8+EAhGD7hB/kQN1K2be7JI0lcVhjoAisozcv9Slulcm6SFqPfQR11SCydVHorQ0xpGz
         XUwJBfE/eYXQSQR65+kYQssml6UYkeFlTOUBcvRyXs2tPjw3wjOS2GZ47iLwOeo+NP7S
         alx3X9Ejvc7bA4V2PFnO4URSlkFH9yfOdOboVd1juWMDuNb088A1IqSV7KobNFNMscVL
         5O9Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:content-language:in-reply-to:mime-version
         :user-agent:date:message-id:from:references:to:subject
         :dkim-signature:arc-authentication-results;
        bh=bUIxTj4im5GXeQ3siBPYZjGJ0+JdPWUQsS6K1pwHJqc=;
        b=CpUOEgKt6hu6ct5SmuTXhHl78srtZ2+fWloJyhs2aLHJGEGZXwDk5ucVGFhcppvYOD
         BSPpuqTUjt4uaI82lELSM4ErEg3yxOpzBn+ROogRo5viEjX0GKrDC3vfiO+UFkjIzhjf
         BKlKr/SY1vJj8/+R1w8bG9BwFTBzpJxB5IqdrSBfDeqSoLKWW9iq5jVegzWk/+lr/GYo
         4nuFz3UwWbz4uCExITJHo5C9VpV1u99Hsrm8LAc0a8wOoVnxk0qQbSp9fTbAhmaH3wX4
         QUqxFlGc8ZEGOVo/4smAyArU37nFdMwgUTaIlM0DKu3UN7E84nn9arAr72gZdq+lboRn
         R2tA==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=b5YWcYf3;
       spf=pass (google.com: domain of jonathanmueller.dev@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jonathanmueller.dev@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65])
        by mx.google.com with SMTPS id h4sor2387528edb.7.2017.10.15.09.27.41
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Sun, 15 Oct 2017 09:27:41 -0700 (PDT)
Received-SPF: pass (google.com: domain of jonathanmueller.dev@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65;
X-Received: by 10.80.135.9 with SMTP id i9mr10043292edb.31.1508084860594;
        Sun, 15 Oct 2017 09:27:40 -0700 (PDT)
Original-Received: from [192.168.1.98] (dslb-084-060-195-012.084.060.pools.vodafone-ip.de. [84.60.195.12])
        by smtp.gmail.com with ESMTPSA id q6sm3857997edk.55.2017.10.15.09.27.39
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sun, 15 Oct 2017 09:27:39 -0700 (PDT)
In-Reply-To: <5accfbfb-91b3-489e-9e2d-b82149b5ce8e@isocpp.org>
Content-Language: en-US
X-Original-Sender: jonathanmueller.dev@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=b5YWcYf3;       spf=pass
 (google.com: domain of jonathanmueller.dev@gmail.com designates 209.85.220.65
 as permitted sender) smtp.mailfrom=jonathanmueller.dev@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:34947
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/34947>

On 15.10.2017 18:21, Nicol Bolas wrote:
>=20
>=20
> On Sunday, October 15, 2017 at 11:48:56 AM UTC-4, Jonathan M=C3=BCller wr=
ote:
>=20
>     On 15.10.2017 17:14, Nicol Bolas wrote:
>      >
>      > =C2=A0 =C2=A0 Although the "virtual overhead" is acceptible in man=
y cases,
>     it is
>      > =C2=A0 =C2=A0 an evidence that "PMRs" still has room to improve.
>      >
>      >
>      > Replacing "virtual overhead" with "type-erased access overhead"
>     is not
>      > an improvement.
>      >
>=20
>     It would be an improvement if you could decide between a type erased
>     allocator and a template allocator.
>=20
>=20
> I don't know what you mean by "template allocator". If you're talking=20
> about like `vector<T, Allocator>`, well, we already have that right now.=
=20
> Users of containers can decide between a virtual allocator and a=20
> "template allocator". Why does "type-erased" need to be an option,=20
> specifically?
>=20

Yes, I meant `vector<T, Allocator>` and yes, we have both options=20
already, so yes, I don't think OP's idea is necessary.

However, for a hypothetical redesign of the standard library I think=20
this should be considered.
An allocator interface similar to the simple PMRs as opposed to the=20
complexity mess that is Allocator, but instead of virtual functions and=20
class hierarchy it is "concept-based" like Allocator and provides the=20
possibility of using type erasure.

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/4aa86771-6ade-02fa-b77e-6f0e33f230ac%40gmail.com=
..

.
