220 34974 <664105b3-ea68-4565-8017-a4893f4b38bf@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Mingxin Wang <wmx16835vv@163.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Idea about "std::pmr::memory_resource"
Date: Mon, 16 Oct 2017 18:29:15 -0700 (PDT)
Lines: 65
Approved: news@gmane.org
Message-ID: <664105b3-ea68-4565-8017-a4893f4b38bf@isocpp.org>
References: <0a8293b4-3246-47a5-9881-bc1ca4b91772@isocpp.org>
 <07ddb1f6-d3af-43df-bf96-8975c1ab4313@isocpp.org>
 <2e191a96-1952-479b-b78b-22e31f8e03de@isocpp.org>
 <0e37b5ae-64f6-4a8a-86bd-f44b119ed40a@isocpp.org>
 <15f8c5ba-3a6a-4441-9620-92e157c66094@isocpp.org>
 <26fe4cb4-98ca-41cc-ac96-5c51851799d1@isocpp.org>
 <fee0a310-5dc5-4421-bf49-bc8fa164fe29@isocpp.org>
 <784ffce8-ace7-449d-a13d-a99d7336117a@isocpp.org>
 <d029c18a-12ee-4a7d-828c-ab1bd07b58c6@isocpp.org>
 <6d0ad98b-87d5-43dd-ac54-2b7d3e03e31b@isocpp.org>
 <bd58ac93-5d20-48e6-93cc-b07a727ce892@isocpp.org>
 <4af80cf7-244c-4137-9133-1a36a209e4ca@isocpp.org>
 <7f22751b-91d1-4de4-81d2-421046ceb963@isocpp.org>
 <68690e5c-f466-4fbe-ab41-80be58257259@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_18766_78233366.1508203755574"
X-Trace: blaine.gmane.org 1508203760 31686 195.159.176.226 (17 Oct 2017 01:29:20 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 17 Oct 2017 01:29:20 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDNMBNHJWIGBB3FZSXHQKGQEXJS5FBA@isocpp.org Tue Oct 17 03:29:14 2017
Return-path: <std-proposals+bncBDNMBNHJWIGBB3FZSXHQKGQEXJS5FBA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f199.google.com ([209.85.217.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDNMBNHJWIGBB3FZSXHQKGQEXJS5FBA@isocpp.org>)
	id 1e4Ggw-00075L-PU
	for gclcip-std-proposals@m.gmane.org; Tue, 17 Oct 2017 03:29:10 +0200
Original-Received: by mail-ua0-f199.google.com with SMTP id d12sf107801uaj.18
        for <gclcip-std-proposals@m.gmane.org>; Mon, 16 Oct 2017 18:29:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=Ih/j1L59qfSUTRtdwzqImCIxCSoJf6vAA7Ci0ceCNF0=;
        b=mVhKS+IiyzBQPhsxLlEz15LWsMGzOkH8mgE9FpJ6j2ZyXok9rgtIcjomym9w4UZuNj
         jWXNwpDRPKFy663ugGMPKMfT9AppfXnYPb3hAEEhA3t8//rsk3Gsf2OQTZ414aGbcqB5
         4azKWzhxar9ooOqujg43rTE/R58p+HVTpgpqijzoP3YuInUfAziVqyt5ujrwbvJj5YOh
         miTYyX5Ezw/ZVBc5TI77wlRRdzu6PrGAtlG9G/Qymu1lteBsRXZP1mKTEo8s53yuCsQU
         /YH2eBvmcUApr0lfPpoPDWykZyyr1PcvHnLIJ8VIyrSg2eK3f47eYF0wa2ilLl0uZKmJ
         sUcA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=Ih/j1L59qfSUTRtdwzqImCIxCSoJf6vAA7Ci0ceCNF0=;
        b=lG3l9vPnqZzcpZKgFL4oAPJr40G+Kec0RYe1eHvB5dT6+bEL3yQi0nzsT1YaPayYi8
         taTpJFDaKEUwc8INJLPWMo1kpmbjWb2a4h2uB6kIz03Ux4NprhPR6i9N/BDz6wNG4oFe
         Nvd50vVHDNDkQInsG64vFW1530l06uTj9XnKqXJ33uGbmkFd25m5uAsPZ33ZiziSgBa/
         zIe+W8XdYp4vG30Llea1OaZSq31hbLO3NSWq2LapXZ4VZvALN7kbmFyDhs/PYYB7Obdl
         AA8uB8TYm36/FVQnStzeeUqLMYsR5i0nRKxEYNu+V+mwr2HIZcyiRxaPhNEQ7fTVxmyV
         2UWg==
X-Gm-Message-State: AMCzsaX6bFpmwLn+dpqBDT+WDV348fFnBGYwzf60lkYHyDey1C84oiHb
	+XqfAzL6HqCvYuSenZ7qxcFqgA==
X-Google-Smtp-Source: ABhQp+RFVML4xIQwoU5guKl2d7wQfIQoUW4U/hthFAS1do99DSszuPN86Ghr2ssei1BQXX6yS2u/sw==
X-Received: by 10.176.78.12 with SMTP id g12mr4678550uah.67.1508203757948;
        Mon, 16 Oct 2017 18:29:17 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.159.53.238 with SMTP id u43ls8558uad.11.gmail; Mon, 16 Oct
 2017 18:29:16 -0700 (PDT)
X-Received: by 10.31.153.21 with SMTP id b21mr870367vke.13.1508203756371;
        Mon, 16 Oct 2017 18:29:16 -0700 (PDT)
In-Reply-To: <68690e5c-f466-4fbe-ab41-80be58257259@isocpp.org>
X-Original-Sender: wmx16835vv@163.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:34974
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/34974>

------=_Part_18766_78233366.1508203755574
Content-Type: multipart/alternative; 
	boundary="----=_Part_18767_1033648290.1508203755574"

------=_Part_18767_1033648290.1508203755574
Content-Type: text/plain; charset="UTF-8"

On Tuesday, October 17, 2017 at 1:39:33 AM UTC+8, Aleksey Loginov wrote:
>
> In other words, by hand-made RTTI, and only for fixed allocation 
> starategies (for example, data_ can not be a shared_ptr<T> or cow_ptr<T>)
>

There is NO RTTI in the implementation of "operator=". This operation is 
done via indirect function calls, and it is as efficient as most 
implementations of `std::any` from various vendors.

`data_` is actually implementation detail, I don't know about your 
motivation that it should be shared_ptr<T> or cow_ptr<T>.

Mingxin Wang

-- 
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 email 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/664105b3-ea68-4565-8017-a4893f4b38bf%40isocpp.org.

------=_Part_18767_1033648290.1508203755574
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tuesday, October 17, 2017 at 1:39:33 AM UTC+8, Aleksey =
Loginov wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"=
><div>In other words, by hand-made RTTI, and only for fixed allocation star=
ategies (for example, data_ can not be a shared_ptr&lt;T&gt; or cow_ptr&lt;=
T&gt;)</div></div></blockquote><div><br></div><div>There is NO RTTI in the =
implementation of &quot;operator=3D&quot;. This operation is done via indir=
ect function calls, and it is as efficient as most implementations of `std:=
:any` from various vendors.</div><div><br></div><div>`data_` is actually im=
plementation detail, I don&#39;t know about your motivation that it should =
be shared_ptr&lt;T&gt; or cow_ptr&lt;T&gt;.</div><div><br></div><div>Mingxi=
n Wang</div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/664105b3-ea68-4565-8017-a4893f4b38bf%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/664105b3-ea68-4565-8017-a4893f4b38bf=
%40isocpp.org</a>.<br />

------=_Part_18767_1033648290.1508203755574--

------=_Part_18766_78233366.1508203755574--

.
