220 5766 <CAEn_SPLLfgFhqQY0D7XH4XHQuQU1r66=yNW6qSLri0jcsOw+og@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Martinho Fernandes <martinho.fernandes@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Making std::vector<std::unique_ptr<void>> not be
 copy constructible, among other things
Date: Fri, 23 Aug 2013 16:39:14 +0200
Lines: 68
Approved: news@gmane.org
Message-ID: <CAEn_SPLLfgFhqQY0D7XH4XHQuQU1r66=yNW6qSLri0jcsOw+og@mail.gmail.com>
References: <CAEn_SP+=gQwxB8RY6ZY6EDHD+gATtzYX_mrKwRZQDEcBcuO+ZQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1377268813 10457 80.91.229.3 (23 Aug 2013 14:40:13 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 23 Aug 2013 14:40:13 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDXL3FEUYQARBEXI3WIAKGQEVTK2XII@isocpp.org Fri Aug 23 16:40:17 2013
Return-path: <std-proposals+bncBDXL3FEUYQARBEXI3WIAKGQEVTK2XII@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qc0-f200.google.com ([209.85.216.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDXL3FEUYQARBEXI3WIAKGQEVTK2XII@isocpp.org>)
	id 1VCsX8-0000Sr-In
	for gclcip-std-proposals@m.gmane.org; Fri, 23 Aug 2013 16:40:14 +0200
Original-Received: by mail-qc0-f200.google.com with SMTP id m20sf552632qcx.3
        for <gclcip-std-proposals@m.gmane.org>; Fri, 23 Aug 2013 07:40:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from: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:content-type
         :content-transfer-encoding;
        bh=txs0GEF8y1kIdT39Ed6Cqkru+G6YZXANoxT8+vOr6d0=;
        b=JpkDFLBTd/YncSjjEKFZAgQKZ8o2YLK5r55+rsUlcbXWAkM5vXLyfOpBymmHG7dg/o
         Eke+M+YbMPn1jQ9hwXHrXFj9urOFUg9OSUYtwHOJ9wjyx2Ty5ZMTHOVjIjI/G150W9ET
         LkqjSmzoV6ccw5xQSfvf86MRavbCz+fQfdEmBsUlQ+Qvzc9XAIZrw8sbtLvMh4Riy2Lq
         /v1tEvIKfzDQsE3Ajfb+yrISBqVt9TGP0PmnxhSMw7Zy4fWIUxVaVKM8yee3X6mD7+5N
         w8DA6T7eQoRgdR8uMtCj6GHVYHw7hUrcTIJ/eU0HJuP+z+7BwRMNKrx3ET34itnhPSj9
         WyEw==
X-Received: by 10.59.5.72 with SMTP id ck8mr911ved.35.1377268813709;
        Fri, 23 Aug 2013 07:40:13 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.4.231 with SMTP id n7ls1530281qen.14.gmail; Fri, 23 Aug
 2013 07:39:14 -0700 (PDT)
X-Received: by 10.49.17.199 with SMTP id q7mr21900151qed.69.1377268754402;
        Fri, 23 Aug 2013 07:39:14 -0700 (PDT)
Original-Received: from mail-qa0-x22f.google.com (mail-qa0-x22f.google.com [2607:f8b0:400d:c00::22f])
        by mx.google.com with ESMTPS id b15si48263qen.99.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Fri, 23 Aug 2013 07:39:14 -0700 (PDT)
Received-SPF: pass (google.com: domain of martinho.fernandes@gmail.com designates 2607:f8b0:400d:c00::22f as permitted sender) client-ip=2607:f8b0:400d:c00::22f;
Original-Received: by mail-qa0-f47.google.com with SMTP id o19so21225qap.20
        for <std-proposals@isocpp.org>; Fri, 23 Aug 2013 07:39:14 -0700 (PDT)
X-Received: by 10.224.125.195 with SMTP id z3mr1647177qar.96.1377268754233;
 Fri, 23 Aug 2013 07:39:14 -0700 (PDT)
Original-Received: by 10.49.11.169 with HTTP; Fri, 23 Aug 2013 07:39:14 -0700 (PDT)
In-Reply-To: <CAEn_SP+=gQwxB8RY6ZY6EDHD+gATtzYX_mrKwRZQDEcBcuO+ZQ@mail.gmail.com>
X-Original-Sender: martinho.fernandes@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of martinho.fernandes@gmail.com designates 2607:f8b0:400d:c00::22f as
 permitted sender) smtp.mail=martinho.fernandes@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) d=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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:5766
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5766>

Oh, right, I almost forgot to ask if maybe concepts would help here as well=
?
Mit freundlichen Gr=FC=DFen,

Martinho


On Fri, Aug 23, 2013 at 4:08 PM, Martinho Fernandes
<martinho.fernandes@gmail.com> wrote:
> First of all, let's make sure we are all aware of the fact that an
> expression that would normally be ill-formed may still count as
> "well-formed" for some purposes:
> http://stackoverflow.com/q/14815998/46642
>
> Now, as far as I can see, the standard makes
> std::vector<std::unique_ptr<void>> have a copy constructor, even
> though it makes any program that instantiates it ill-formed as a
> consequence of its defined semantics. Please correct me if my reading
> of the standard here is wrong and makes all of this moot.
>
> These two facts explain why this program is well-formed:
>
> http://coliru.stacked-crooked.com/view?id=3D735d0e4868baddb9fa210cbf18ca0=
2e7-f0bd80647c520ac4f6fb0347af37c64b
>
> And this is merely the best example I came up with. There are other
> similar issues the standard library, and there is also the general
> case of traits testing arbitrary functions in other libraries (which I
> first explored here
> http://flamingdangerzone.com/cxx11/2013/02/11/to-sfinae-or-not-to-sfinae)
>
> This is quite unfortunate, I'd say. As a library designer the
> inability to work around this is something that has been annoying me
> for a while.
>
> I have been wondering about two possible changes to ease this
> nuissance. The first one would be to fix the standard library so that
> the constructor is only there for actually copy constructible Ts (and
> similar fixes to other functions). I don't know how much code this
> would break, and more importantly, how much non-iffy code this would
> break.
>
> The second one would involve giving library designers the ability to
> look past the "immediate context", something like `wellformed(expr)`
> operator. I also don't know how feasible that would be and it would
> certainly make this part of the language even more complex.
>
> I know the deadline for submissions is soon, and I don't think I would
> have the time to think everything through to make a decent proposal.
> But I want to know if others think this is a problem that needs
> solving like I do, and if the solutions are worth making into a future
> proposal, potentially for C++17.
>
> Mit freundlichen Gr=FC=DFen,
>
> Martinho

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

.
