220 34470 <057ee7d2-f5e9-4255-9497-fbf8b64c55f5@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: inkwizytoryankes@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Musings on customization points, ADL, and the
 loss of namespaces
Date: Sun, 24 Sep 2017 02:19:21 -0700 (PDT)
Lines: 188
Approved: news@gmane.org
Message-ID: <057ee7d2-f5e9-4255-9497-fbf8b64c55f5@isocpp.org>
References: <cbfeed92-f740-4acf-817f-59c61224c2db@isocpp.org>
 <f8297436-9f27-49e6-ae55-635706acf89e@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_4311_1590037433.1506244761673"
X-Trace: blaine.gmane.org 1506244765 6684 195.159.176.226 (24 Sep 2017 09:19:25 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 24 Sep 2017 09:19:25 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDDLTAGNTIBBBGXRTXHAKGQEOQ6LDFQ@isocpp.org Sun Sep 24 11:19:20 2017
Return-path: <std-proposals+bncBDDLTAGNTIBBBGXRTXHAKGQEOQ6LDFQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f200.google.com ([209.85.217.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDDLTAGNTIBBBGXRTXHAKGQEOQ6LDFQ@isocpp.org>)
	id 1dw34G-00015k-Lk
	for gclcip-std-proposals@m.gmane.org; Sun, 24 Sep 2017 11:19:16 +0200
Original-Received: by mail-ua0-f200.google.com with SMTP id n94sf2977377uan.5
        for <gclcip-std-proposals@m.gmane.org>; Sun, 24 Sep 2017 02:19:24 -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=mRk1MPGlNbp+MQiN4BK+q91+mYLKxSUH1YssZlQAVbY=;
        b=04E0+xURWjaVqYUQmko/ZMscwjYJ1UrQLSaK1w0QFde4xqav5kqzawHuNHraU5L81w
         nFQ4oU88lkrHH7zCl0VSuc2/qrafFrCucn8+9/xeci243nfycGLf5Kfn1gkl6JLfTuQB
         Dl/bYG4uoZw54rzfxCkXL4F5vkUjt8Sbbv1i8KWdhT7b7DBACq48iwSJBLwI3s2z9Q/Z
         fDwj1DsCjv4LZLFgcXLlZIQQFgLTS+hkNkfPWAdFWXsQto31QeNdivYWK3Q4S1kbz2vB
         TakTvmK2gf7i7oyzutsxes6xrFYfGI/FdTZTTvnoplCl6ypi0Ki2omgCbbQ9cD68lwfV
         aa5Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        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=mRk1MPGlNbp+MQiN4BK+q91+mYLKxSUH1YssZlQAVbY=;
        b=ZxqqoY3uLE2yQHfF8NzvpWbu0Z55gfS3BlpWEWM97zNZUmAH1pMBSsnD9RjlmbbeGv
         HbGDobzJDf6Gv4fveU3kyWjQBPZqHhofhik6YvHPzJuu+mzHpWBVEZCQNPp7RI4XhOmc
         JU3U/upaE8QU5KzS8HjRhI6lVl8UnQAXg8l9zdT6X7Zfdx0vvP7IcgTZyZYucS9dzjPb
         6wiULqgZEcLViEOPGUdCAGvPT3KM9jC4ysjkuNSHLBnZWDCCMrr6SpbQ3zqZaAyq+TBX
         jzQELicQM9yPwwpxaR1DgakPKAWWyCKtPKGW5+CohQ7NxId1+XpLstvga1zmgVZfT5Nt
         inaQ==
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=mRk1MPGlNbp+MQiN4BK+q91+mYLKxSUH1YssZlQAVbY=;
        b=bH/mYMBHzb+ASHo0aewNRyjWQ9/OKX7iawWez6KdU/AYUO72QErthS6v8ylUYXFFfN
         nlvDfQliH1/MaOtUS55+G0h3a4lypreQZshUcoAPZ7Ltff9DNli3lnYA4fzQrzuDkqI7
         DF8CuIA6hSqbRpTeqzVOScRDHC34c0rvYf6Yl0fKhINsOV4M2TUnw1xJ/L81WlCJGLK7
         shRwU+4I6jxpuf9AOAJSBx5ldJpdXZeJsHZwLUjmRs5w6gMXuLfS+sVv5t2OcvG8drff
         nwM2aqx8od+RbZanNlcpnqRoPeLkj0jB4ojpFUSxJqcv0E5WJMsw88xkW22grrSJ6EOE
         AJgg==
X-Gm-Message-State: AHPjjUiRZmZnfskCo/S6iOn9UAkFqPNFKKAn2OfnOVxOSnl2lgt1t/iI
	MuQ5HIHoG90FSymXTKpWoZ0mpQ==
X-Google-Smtp-Source: AOwi7QACafDRkwK8CESpQJd8QMkqPqaMotmYlS4UriHTf/c0ifdzYkFKC6wuBv/z1dhAcVAYXG01jA==
X-Received: by 10.31.148.210 with SMTP id w201mr2413170vkd.10.1506244763783;
        Sun, 24 Sep 2017 02:19:23 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.31.114.203 with SMTP id n194ls3812094vkc.0.gmail; Sun, 24 Sep
 2017 02:19:22 -0700 (PDT)
X-Received: by 10.31.180.22 with SMTP id d22mr148452vkf.4.1506244762445;
        Sun, 24 Sep 2017 02:19:22 -0700 (PDT)
In-Reply-To: <f8297436-9f27-49e6-ae55-635706acf89e@isocpp.org>
X-Original-Sender: inkwizytoryankes@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:34470
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/34470>

------=_Part_4311_1590037433.1506244761673
Content-Type: multipart/alternative; 
	boundary="----=_Part_4312_1939803881.1506244761673"

------=_Part_4312_1939803881.1506244761673
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable



On Saturday, September 23, 2017 at 11:54:12 PM UTC+2, Aar=C3=B3n Bueno Vill=
ares=20
wrote:
>
>
> Anyway, the solution I purposed was just to add and extra parameter of=20
> type, std::tag, for example, or std::customize inheriting from std::tag=
=20
> (imitating the phylosophy of std::exception and its hierarchy), to make t=
he=20
> source namespace present as a last user's customization point parameter=
=20
> (which will remove the need of "poison pills" too).
>
> I think this is interesting solution, nobody will by mistaken using this=
=20
tag and name conflict will be fix by overloads:
namespace std
{

class customize_t {} customize;

template<typename T>
void swap(customize_t, T a, T b);

template<typename T>
void swap(T a, T b)
{
    swap(customize, a, b);
}


}

namespace My
{

class A;
void swap(A, A); //backward compatible version for C++03 code
void swap(std::customize_t, A a, A b); //new customization point

}


--=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/057ee7d2-f5e9-4255-9497-fbf8b64c55f5%40isocpp.or=
g.

------=_Part_4312_1939803881.1506244761673
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Saturday, September 23, 2017 at 11:54:12 PM UTC=
+2, Aar=C3=B3n Bueno Villares wrote:<blockquote class=3D"gmail_quote" style=
=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: =
1ex;"><div dir=3D"ltr"><br><div>Anyway, the solution I purposed was just to=
 add and extra parameter of type, std::tag, for example, or std::customize =
inheriting from std::tag (imitating the phylosophy of std::exception and it=
s hierarchy), to make the source namespace present as a last user&#39;s cus=
tomization point parameter (which will remove the need of &quot;poison pill=
s&quot; too).</div><br></div></blockquote><div>I think this is interesting =
solution, nobody will by mistaken using this tag and name conflict will be =
fix by overloads:</div><div><div style=3D"background-color: rgb(250, 250, 2=
50); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1=
px; overflow-wrap: break-word;" class=3D"prettyprint"><code class=3D"pretty=
print"><div class=3D"subprettyprint"><span style=3D"color: #008;" class=3D"=
styled-by-prettify">namespace</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> std<br></span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"><br><br></span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">class</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> customize_t </span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">{}</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> cus=
tomize</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br></spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">template</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span =
style=3D"color: #008;" class=3D"styled-by-prettify">typename</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> T</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #008;"=
 class=3D"styled-by-prettify">void</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> swap</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify">customize_t</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> T a</span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> T b</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">);</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"><br><br></span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">template</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">typename</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> T</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">void</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> swap</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">T=
 a</span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> T b</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 swap</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify">customize</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> a</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> b</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">}</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"><br><br><br></span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">}</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"><br><br></span><span style=3D"colo=
r: #008;" class=3D"styled-by-prettify">namespace</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" =
class=3D"styled-by-prettify">My</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"><br></span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"><br></span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
<br></span><span style=3D"color: #008;" class=3D"styled-by-prettify">class<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> A</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">void</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> swap</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify">A</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> A</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
 style=3D"color: #800;" class=3D"styled-by-prettify">//backward compatible =
version for C++03 code</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br></span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">void</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 swap</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify">std</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">customize_t</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> A a</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> A b</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">);</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #800;" class=3D"styled-by-prettify"=
>//new customization point</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br><br></span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">}</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"><br></span></div></code></div><br><br></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/057ee7d2-f5e9-4255-9497-fbf8b64c55f5%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/057ee7d2-f5e9-4255-9497-fbf8b64c55f5=
%40isocpp.org</a>.<br />

------=_Part_4312_1939803881.1506244761673--

------=_Part_4311_1590037433.1506244761673--

.
