220 33271 <CAPCFJdSxx8TBEC+bdPr+MnZPBYvZKrFK350zOnwE7U7Ug0BmmQ@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: =?UTF-8?Q?Micha=C5=82_Dominiak?= <griwes@griwes.info>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Adding operator overloading case to structure binding
Date: Fri, 21 Jul 2017 14:04:06 +0000
Lines: 255
Approved: news@gmane.org
Message-ID: <CAPCFJdSxx8TBEC+bdPr+MnZPBYvZKrFK350zOnwE7U7Ug0BmmQ@mail.gmail.com>
References: <d992c1f5-72f1-4127-9b53-3a4d360a58d6@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="94eb2c18828a3c56940554d457c5"
X-Trace: blaine.gmane.org 1500645865 17963 195.159.176.226 (21 Jul 2017 14:04:25 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 21 Jul 2017 14:04:25 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCA6D5ULVYBRBYMTZDFQKGQEWRC4KHA@isocpp.org Fri Jul 21 16:04:16 2017
Return-path: <std-proposals+bncBCA6D5ULVYBRBYMTZDFQKGQEWRC4KHA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f69.google.com ([209.85.214.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCA6D5ULVYBRBYMTZDFQKGQEWRC4KHA@isocpp.org>)
	id 1dYYXN-00047y-Ex
	for gclcip-std-proposals@m.gmane.org; Fri, 21 Jul 2017 16:04:13 +0200
Original-Received: by mail-it0-f69.google.com with SMTP id v127sf48683439itd.3
        for <gclcip-std-proposals@m.gmane.org>; Fri, 21 Jul 2017 07:04:19 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1500645859; cv=pass;
        d=google.com; s=arc-20160816;
        b=Z4VolR5hRA5rV6eWoCzujK0/zNv2MZXwg+euh5tiC82BrEzKiPlrLQcS55+WfC+NPJ
         XmLGYPSsTbds3D87hK3euBFlcvzYWjW/0M1oCiOMzXPLtBx3wyzs9MQn3yxMg0hfvCC4
         VKYSzDvA9nIBsZgmMFvj3Se3DXPIU7BJyh9cvBApb6KqBWKo8aA8plHKS1zH2KS85r3L
         iJB56ff1PsQSQlCLVDzww1GG+RmmdTZJ7S4CpJgYmnTr6EZwS8AKjwBCJtMCU0cqvXQk
         S+iMBn9XNpmcWrcH9PbE5bh9h12j7NFt+Uy7LmDMWQRqJDR8vfd3kI9r+/ct9+1LdezZ
         An6Q==
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:to:subject:message-id:date
         :from:in-reply-to:references:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=Np67NBooKUujCGCyN8kZg9zfKl/HKjH3Y7SAcqFSUQ4=;
        b=yRjXV931AbSowyxGniebRqB6s8QGrGQj5NFGgXK+8vYMViga6B3VKhHOLtxcqZFxif
         ZdwnNU3HTUy9CBugB8UMNPAmOtVtGbf4dTlVyvwT8p3b3NZXAgTYjsQX28VmLSCkhrPt
         Jt28xNPatNQLYvYDWZS7o3ZyLCVhQyPQpICO4Xt2YDISe0dSqJCsl2ZmZsUTuh/9j4fx
         HIcD+VFcaYIsRTw5tdriMGN1k2Iei10pXfaChwWAkcy+7KTjDzPn0hx+3u+H2AoLMUE+
         yjxoQ2W4M6k4GU39KJHp6aI45sEnJD/yXccFnVBSvm3oaOLfK3ef7NluEu3dT/qaPg44
         9VLg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@griwes-info.20150623.gappssmtp.com header.b=nHFqm4oq;
       spf=neutral (google.com: 2607:f8b0:400e:c00::233 is neither permitted nor denied by best guess record for domain of admin@griwes.info) smtp.mailfrom=admin@griwes.info
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :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=Np67NBooKUujCGCyN8kZg9zfKl/HKjH3Y7SAcqFSUQ4=;
        b=0MmeB1Ji/T77Ve+BBtWLC71fMqvVQ7iSqtJBGNMj2nBzsj8AjQt8BQenIvAXNPK1uG
         JTgmNMVre9u0f/CuxjRXLVRTBYLWQfsXC/IlfyhXEnF8LAgE1Kk0xY2d4ROYdJG0X480
         SGat3Gdpb5qqFB+rjze5FIxVL2RJ02Wjt2aMUaZK758ti5Ss0lxRDSNq8J7x0IZL87xa
         FyuCnlOXM0rIMbZhBsRw0uCLaheW28JfDlWN2YL99xvbajXE38s9O8nrFqU0AVsCbLkd
         5P6Ps34+ZkpPrc8zfJ1LY9jpUpqCgtEQ4ThwMtBo5j/HviJyku0D2KV4Q9drdolOVm3q
         Q/uw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to: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=Np67NBooKUujCGCyN8kZg9zfKl/HKjH3Y7SAcqFSUQ4=;
        b=V0UZ5CM0sM0cXvpesptv8Cu0lB+HF2Q1AFhDXV1P41kSm8eXOHmJiYNR7zg7zsRsSF
         U1+URlS0Nx9VARSI0hf5VAtJqIX4i7PJiK0uCxwQ/HAH4jcDO6YFF1zVUX8rq6cOXec7
         /PCnUiHpg36/cNMQmwaF4ZnQ2G/FqiaOSnPQ5sInya65clspCFSbJ29dHesyyAS5OJEY
         ahraUeDtbSolWEMDElIUE1jqmiClfWRkQRU9nh2ZPACo/+2nh7Ung+XeXWBvzhar/TCI
         Uh6IdQBSnpmKcwrtJBFzRmd5IJb4zf498KAejMsIdWj5qH26QlsyCYh2WfHHJo70DtZo
         zDPQ==
X-Gm-Message-State: AIVw113jwoyryWq7YP29VZ+itXg3Z5puswpz92CW8KqsaGnil4bslQHJ
	j3Uqg6PIG85zYA==
X-Received: by 10.36.121.20 with SMTP id z20mr4359477itc.4.1500645858923;
        Fri, 21 Jul 2017 07:04:18 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.18.214 with SMTP id 83ls750068ios.42.gmail; Fri, 21 Jul
 2017 07:04:17 -0700 (PDT)
X-Received: by 10.98.109.65 with SMTP id i62mr7675572pfc.309.1500645857488;
        Fri, 21 Jul 2017 07:04:17 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1500645857; cv=none;
        d=google.com; s=arc-20160816;
        b=h9iONGO+ZL3Fl8z0Hu3Cl8t+2AKlWm+MgA+2oNSbIh9EQjlkS3Zz0qXFBjIAM3fHVN
         gaPvbcq1VFsDOXkJuWaAAksEslF2Vk8CvlgNfqOmFTpXJfC4DjGTEBw68534PZ0KGfES
         dBY/eEUyZ/gqZSATl+gx2J6Ff1HS29EkkKTKHhNZRZHE6hBJ3kzyP243Z12NRbt1ajyF
         2QRTg30XFGpHpivQKxvKTTgAvMMV+qa4PXe+r/67YoXc6FKbFJniP9+yWKvOEjTDvW/+
         kAp/4geBdmXdK6MZaoONGNfghNG96Odpn9xUeehNwWZcQryaw4NyodDtBrK+qQrctSqa
         Rd8w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:in-reply-to:references:mime-version
         :dkim-signature:arc-authentication-results;
        bh=ssg1ACsRPOwOpo6f+fUER2s3rEdcc7D+cNQXiPJi8eQ=;
        b=wHXV6kBgsB68/PPvVrCMmzSDYWbOzkJlfEjxErks30NMPsCIXqdzsod2p6DMkmiCgM
         ib29/uS1vUH4ZFZc+cTmFx5gTBKHkQJRuv3RB+28bjkYTdJ+MdZUBuej/iF9hQhUshFz
         03cBxTMQjTQffSStI5Pf3rG3F3xgRYJ50UngKes9fPBgqlRUwxDPjsDLkoLlTK4PhnRE
         sJeFJJGOPzydLkWUHpHkNG6urU9k+paInGC2kjQmxXr3dtpUJjFQMAd7K/sW7u/QpGLc
         7Ynvdoks4+bnrC2fuEoP8sOihBov62sD75Ew4ES43ZQg3bgqoJ0anMgmWy+H+wSAN6EA
         AlDw==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@griwes-info.20150623.gappssmtp.com header.b=nHFqm4oq;
       spf=neutral (google.com: 2607:f8b0:400e:c00::233 is neither permitted nor denied by best guess record for domain of admin@griwes.info) smtp.mailfrom=admin@griwes.info
Original-Received: from mail-pf0-x233.google.com (mail-pf0-x233.google.com. [2607:f8b0:400e:c00::233])
        by mx.google.com with ESMTPS id n78si3062708pfg.444.2017.07.21.07.04.17
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 21 Jul 2017 07:04:17 -0700 (PDT)
Received-SPF: neutral (google.com: 2607:f8b0:400e:c00::233 is neither permitted nor denied by best guess record for domain of admin@griwes.info) client-ip=2607:f8b0:400e:c00::233;
Original-Received: by mail-pf0-x233.google.com with SMTP id q85so24602896pfq.1
        for <std-proposals@isocpp.org>; Fri, 21 Jul 2017 07:04:17 -0700 (PDT)
X-Received: by 10.84.210.141 with SMTP id a13mr8396501pli.199.1500645856918;
 Fri, 21 Jul 2017 07:04:16 -0700 (PDT)
In-Reply-To: <d992c1f5-72f1-4127-9b53-3a4d360a58d6@isocpp.org>
X-Original-Sender: griwes@griwes.info
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@griwes-info.20150623.gappssmtp.com header.b=nHFqm4oq;
       spf=neutral (google.com: 2607:f8b0:400e:c00::233 is neither permitted
 nor denied by best guess record for domain of admin@griwes.info) smtp.mailfrom=admin@griwes.info
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:33271
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33271>

--94eb2c18828a3c56940554d457c5
Content-Type: text/plain; charset="UTF-8"

There is currently a customization point (or, a set of customization
points...) for this feature in the language: std::tuple_size,
std::tuple_element, and get(). They aren't pretty to use, but I'm not
convinced your proposed way to customize the behavior is really better.

On Fri, Jul 21, 2017 at 3:42 PM Logan Song <ashenveilsong@gmail.com> wrote:

> According to the C++ standard, structure binding has three cases right now:
>
>    1. binding an array
>    2. binding a tuple-like type
>    3. binding to public data members
>
> For example:
> #include <cstddef>
> #include <tuple>
>
> class tag_ptr {
> private:
>     void* holder;
>
> public:
>     explicit operator ::std::tuple<void*, ::std::byte>() {
>         return ::std::tuple(ptr(), tag());
>     }
>
>     void* ptr() {...}
>     ::std::byte tag() {...}
> };
>
> tag_ptr tp;
>
> auto ptr = tp.ptr();
> auto tag = tp.tag(); //Uhhhh
>
> //error: cannot decompose non-public member 'holder' of 'tag_ptr'
> //auto [ptr, tag] = tp;
>
> Assume we have a class tag_ptr. It could store some bits compressed with a
> pointer, which we couldn't expose it directly.
> As we can see, it's very cumbrous to init variables one by one.
>
> But if we relax the restrictions of rule2 to allow binding type which has
> tuple-like type cast operator.
> The code will be more clear and it could make interfaces more graceful.
>
> That's my proposal. :)
>
> --
> 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/d992c1f5-72f1-4127-9b53-3a4d360a58d6%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/d992c1f5-72f1-4127-9b53-3a4d360a58d6%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAPCFJdSxx8TBEC%2BbdPr%2BMnZPBYvZKrFK350zOnwE7U7Ug0BmmQ%40mail.gmail.com.

--94eb2c18828a3c56940554d457c5
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">There is currently a customization point (or, a set of cus=
tomization points...) for this feature in the language: std::tuple_size, st=
d::tuple_element, and get(). They aren&#39;t pretty to use, but I&#39;m not=
 convinced your proposed way to customize the behavior is really better.</d=
iv><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, Jul 21, 2017 at =
3:42 PM Logan Song &lt;<a href=3D"mailto:ashenveilsong@gmail.com">ashenveil=
song@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div =
dir=3D"ltr">According to the C++ standard,=C2=A0structure binding has three=
 cases right now:<div><ol><li>binding an array</li><li>binding a tuple-like=
 type</li><li>binding to public data members</li></ol></div><div>For exampl=
e:</div><div><div class=3D"m_-5921142759629577877prettyprint" style=3D"back=
ground-color:rgb(250,250,250);border:1px solid rgb(187,187,187);word-wrap:b=
reak-word"><code class=3D"m_-5921142759629577877prettyprint"><div class=3D"=
m_-5921142759629577877subprettyprint"><span style=3D"color:#800" class=3D"m=
_-5921142759629577877styled-by-prettify">#include</span><span style=3D"colo=
r:#000" class=3D"m_-5921142759629577877styled-by-prettify"> </span><span st=
yle=3D"color:#080" class=3D"m_-5921142759629577877styled-by-prettify">&lt;c=
stddef&gt;</span><span style=3D"color:#000" class=3D"m_-5921142759629577877=
styled-by-prettify"><br></span><span style=3D"color:#800" class=3D"m_-59211=
42759629577877styled-by-prettify">#include</span><span style=3D"color:#000"=
 class=3D"m_-5921142759629577877styled-by-prettify"> </span><span style=3D"=
color:#080" class=3D"m_-5921142759629577877styled-by-prettify">&lt;tuple&gt=
;</span><span style=3D"color:#000" class=3D"m_-5921142759629577877styled-by=
-prettify"><br><br></span><span style=3D"color:#008" class=3D"m_-5921142759=
629577877styled-by-prettify">class</span><span style=3D"color:#000" class=
=3D"m_-5921142759629577877styled-by-prettify"> tag_ptr </span><span style=
=3D"color:#660" class=3D"m_-5921142759629577877styled-by-prettify">{</span>=
<span style=3D"color:#000" class=3D"m_-5921142759629577877styled-by-prettif=
y"><br></span><span style=3D"color:#008" class=3D"m_-5921142759629577877sty=
led-by-prettify">private</span><span style=3D"color:#660" class=3D"m_-59211=
42759629577877styled-by-prettify">:</span><span style=3D"color:#000" class=
=3D"m_-5921142759629577877styled-by-prettify"><br>=C2=A0 =C2=A0 </span><spa=
n style=3D"color:#008" class=3D"m_-5921142759629577877styled-by-prettify">v=
oid</span><span style=3D"color:#660" class=3D"m_-5921142759629577877styled-=
by-prettify">*</span><span style=3D"color:#000" class=3D"m_-592114275962957=
7877styled-by-prettify"> holder</span><span style=3D"color:#660" class=3D"m=
_-5921142759629577877styled-by-prettify">;</span><span style=3D"color:#000"=
 class=3D"m_-5921142759629577877styled-by-prettify"><br><br></span><span st=
yle=3D"color:#008" class=3D"m_-5921142759629577877styled-by-prettify">publi=
c</span><span style=3D"color:#660" class=3D"m_-5921142759629577877styled-by=
-prettify">:</span><span style=3D"color:#000" class=3D"m_-59211427596295778=
77styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color:#008" c=
lass=3D"m_-5921142759629577877styled-by-prettify">explicit</span><span styl=
e=3D"color:#000" class=3D"m_-5921142759629577877styled-by-prettify"> </span=
><span style=3D"color:#008" class=3D"m_-5921142759629577877styled-by-pretti=
fy">operator</span><span style=3D"color:#000" class=3D"m_-59211427596295778=
77styled-by-prettify"> </span><span style=3D"color:#660" class=3D"m_-592114=
2759629577877styled-by-prettify">::</span><span style=3D"color:#000" class=
=3D"m_-5921142759629577877styled-by-prettify">std</span><span style=3D"colo=
r:#660" class=3D"m_-5921142759629577877styled-by-prettify">::</span><span s=
tyle=3D"color:#000" class=3D"m_-5921142759629577877styled-by-prettify">tupl=
e</span><span style=3D"color:#660" class=3D"m_-5921142759629577877styled-by=
-prettify">&lt;</span><span style=3D"color:#008" class=3D"m_-59211427596295=
77877styled-by-prettify">void</span><span style=3D"color:#660" class=3D"m_-=
5921142759629577877styled-by-prettify">*</span><font color=3D"#000000"><spa=
n style=3D"color:#660" class=3D"m_-5921142759629577877styled-by-prettify">,=
</span><span style=3D"color:#000" class=3D"m_-5921142759629577877styled-by-=
prettify"> </span><span style=3D"color:#660" class=3D"m_-592114275962957787=
7styled-by-prettify">::</span><span style=3D"color:#000" class=3D"m_-592114=
2759629577877styled-by-prettify">std</span><span style=3D"color:#660" class=
=3D"m_-5921142759629577877styled-by-prettify">::</span><span style=3D"color=
:#008" class=3D"m_-5921142759629577877styled-by-prettify">byte</span></font=
><span style=3D"color:#660" class=3D"m_-5921142759629577877styled-by-pretti=
fy">&gt;()</span><span style=3D"color:#000" class=3D"m_-5921142759629577877=
styled-by-prettify"> </span><span style=3D"color:#660" class=3D"m_-59211427=
59629577877styled-by-prettify">{</span><span style=3D"color:#000" class=3D"=
m_-5921142759629577877styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 <=
/span><span style=3D"color:#008" class=3D"m_-5921142759629577877styled-by-p=
rettify">return</span><span style=3D"color:#000" class=3D"m_-59211427596295=
77877styled-by-prettify"> </span><span style=3D"color:#660" class=3D"m_-592=
1142759629577877styled-by-prettify">::</span><span style=3D"color:#000" cla=
ss=3D"m_-5921142759629577877styled-by-prettify">std</span><span style=3D"co=
lor:#660" class=3D"m_-5921142759629577877styled-by-prettify">::</span><span=
 style=3D"color:#000" class=3D"m_-5921142759629577877styled-by-prettify">tu=
ple</span><span style=3D"color:#660" class=3D"m_-5921142759629577877styled-=
by-prettify">(</span><span style=3D"color:#000" class=3D"m_-592114275962957=
7877styled-by-prettify">ptr</span><span style=3D"color:#660" class=3D"m_-59=
21142759629577877styled-by-prettify">(),</span><span style=3D"color:#000" c=
lass=3D"m_-5921142759629577877styled-by-prettify"> tag</span><span style=3D=
"color:#660" class=3D"m_-5921142759629577877styled-by-prettify">());</span>=
<span style=3D"color:#000" class=3D"m_-5921142759629577877styled-by-prettif=
y"><br>=C2=A0 =C2=A0 </span><span style=3D"color:#660" class=3D"m_-59211427=
59629577877styled-by-prettify">}</span><span style=3D"color:#000" class=3D"=
m_-5921142759629577877styled-by-prettify"><br><br>=C2=A0 =C2=A0 </span><spa=
n style=3D"color:#008" class=3D"m_-5921142759629577877styled-by-prettify">v=
oid</span><span style=3D"color:#660" class=3D"m_-5921142759629577877styled-=
by-prettify">*</span><span style=3D"color:#000" class=3D"m_-592114275962957=
7877styled-by-prettify"> ptr</span><span style=3D"color:#660" class=3D"m_-5=
921142759629577877styled-by-prettify">()</span><span style=3D"color:#000" c=
lass=3D"m_-5921142759629577877styled-by-prettify"> </span><span style=3D"co=
lor:#660" class=3D"m_-5921142759629577877styled-by-prettify">{...}</span><s=
pan style=3D"color:#000" class=3D"m_-5921142759629577877styled-by-prettify"=
><br>=C2=A0 =C2=A0 </span><span style=3D"color:#660" class=3D"m_-5921142759=
629577877styled-by-prettify">::</span><span style=3D"color:#000" class=3D"m=
_-5921142759629577877styled-by-prettify">std</span><span style=3D"color:#66=
0" class=3D"m_-5921142759629577877styled-by-prettify">::</span><span style=
=3D"color:#008" class=3D"m_-5921142759629577877styled-by-prettify">byte</sp=
an><span style=3D"color:#000" class=3D"m_-5921142759629577877styled-by-pret=
tify"> tag</span><span style=3D"color:#660" class=3D"m_-5921142759629577877=
styled-by-prettify">()</span><span style=3D"color:#000" class=3D"m_-5921142=
759629577877styled-by-prettify"> </span><span style=3D"color:#660" class=3D=
"m_-5921142759629577877styled-by-prettify">{...}</span><span style=3D"color=
:#000" class=3D"m_-5921142759629577877styled-by-prettify"><br></span><span =
style=3D"color:#660" class=3D"m_-5921142759629577877styled-by-prettify">};<=
/span><span style=3D"color:#000" class=3D"m_-5921142759629577877styled-by-p=
rettify"><br><br>tag_ptr tp</span><span style=3D"color:#660" class=3D"m_-59=
21142759629577877styled-by-prettify">;</span><span style=3D"color:#000" cla=
ss=3D"m_-5921142759629577877styled-by-prettify"><br><br></span><span style=
=3D"color:#008" class=3D"m_-5921142759629577877styled-by-prettify">auto</sp=
an><span style=3D"color:#000" class=3D"m_-5921142759629577877styled-by-pret=
tify"> ptr </span><span style=3D"color:#660" class=3D"m_-592114275962957787=
7styled-by-prettify">=3D</span><span style=3D"color:#000" class=3D"m_-59211=
42759629577877styled-by-prettify"> tp</span><span style=3D"color:#660" clas=
s=3D"m_-5921142759629577877styled-by-prettify">.</span><span style=3D"color=
:#000" class=3D"m_-5921142759629577877styled-by-prettify">ptr</span><span s=
tyle=3D"color:#660" class=3D"m_-5921142759629577877styled-by-prettify">();<=
/span><span style=3D"color:#000" class=3D"m_-5921142759629577877styled-by-p=
rettify"><br></span><span style=3D"color:#008" class=3D"m_-5921142759629577=
877styled-by-prettify">auto</span><span style=3D"color:#000" class=3D"m_-59=
21142759629577877styled-by-prettify"> tag </span><span style=3D"color:#660"=
 class=3D"m_-5921142759629577877styled-by-prettify">=3D</span><span style=
=3D"color:#000" class=3D"m_-5921142759629577877styled-by-prettify"> tp</spa=
n><span style=3D"color:#660" class=3D"m_-5921142759629577877styled-by-prett=
ify">.</span><span style=3D"color:#000" class=3D"m_-5921142759629577877styl=
ed-by-prettify">tag</span><span style=3D"color:#660" class=3D"m_-5921142759=
629577877styled-by-prettify">();</span><span style=3D"color:#000" class=3D"=
m_-5921142759629577877styled-by-prettify"> </span><span style=3D"color:#800=
" class=3D"m_-5921142759629577877styled-by-prettify">//Uhhhh</span><span st=
yle=3D"color:#000" class=3D"m_-5921142759629577877styled-by-prettify"><br><=
br></span><span style=3D"color:#800" class=3D"m_-5921142759629577877styled-=
by-prettify">//</span><span style=3D"font-family:Menlo;font-size:11px"><spa=
n style=3D"color:#800" class=3D"m_-5921142759629577877styled-by-prettify">e=
rror: cannot decompose non-public member &#39;holder&#39; of &#39;tag_ptr&#=
39;</span><span style=3D"color:#000" class=3D"m_-5921142759629577877styled-=
by-prettify"><br></span></span><span style=3D"color:#800" class=3D"m_-59211=
42759629577877styled-by-prettify">//auto [ptr, tag] =3D tp; </span><span st=
yle=3D"font-family:Menlo;font-size:11px"><span style=3D"color:#000" class=
=3D"m_-5921142759629577877styled-by-prettify"><br></span></span></div></cod=
e></div><br></div><div>Assume we have a class tag_ptr. It could store=C2=A0=
some bits compressed with a pointer, which we couldn&#39;t expose it direct=
ly.</div><div>As we can see, it&#39;s very cumbrous to init variables one b=
y one.</div><div><br></div><div>But if we relax the restrictions of rule2 t=
o allow binding type which has tuple-like type cast operator.</div><div>The=
 code will be more clear and it could make interfaces more graceful.</div><=
div><br></div><div>That&#39;s my proposal. :)</div><div><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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/d992c1f5-72f1-4127-9b53-3a4d360a58d6%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/d992c1f5-72f1-=
4127-9b53-3a4d360a58d6%40isocpp.org</a>.<br>
</blockquote></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/CAPCFJdSxx8TBEC%2BbdPr%2BMnZPBYvZKrFK=
350zOnwE7U7Ug0BmmQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdSxx8TB=
EC%2BbdPr%2BMnZPBYvZKrFK350zOnwE7U7Ug0BmmQ%40mail.gmail.com</a>.<br />

--94eb2c18828a3c56940554d457c5--

.
