220 5801 <079a64f7-2606-4309-8472-8624032c2f03@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: David Krauss <potswa@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: Sun, 25 Aug 2013 10:54:17 -0700 (PDT)
Lines: 36
Approved: news@gmane.org
Message-ID: <079a64f7-2606-4309-8472-8624032c2f03@isocpp.org>
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 1377453258 21030 80.91.229.3 (25 Aug 2013 17:54:18 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 25 Aug 2013 17:54:18 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCW25A7E3QCRBSUJ5GIAKGQE6AJWPTQ@isocpp.org Sun Aug 25 19:54:21 2013
Return-path: <std-proposals+bncBCW25A7E3QCRBSUJ5GIAKGQE6AJWPTQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f71.google.com ([209.85.219.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCW25A7E3QCRBSUJ5GIAKGQE6AJWPTQ@isocpp.org>)
	id 1VDeW4-0006AQ-FC
	for gclcip-std-proposals@m.gmane.org; Sun, 25 Aug 2013 19:54:20 +0200
Original-Received: by mail-oa0-f71.google.com with SMTP id k18sf11423581oag.2
        for <gclcip-std-proposals@m.gmane.org>; Sun, 25 Aug 2013 10:54:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        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
         :content-type:content-transfer-encoding;
        bh=YcjCq9ySqGARWL9dypjPFdZ/S8f4PgdgY0ceV4TSkzU=;
        b=wGTaRv6ICkihILN7evdjGfMU5dQt/bvhDOihTX6zvieaUgHLhagrHKUMFbP1N2VvBk
         IFfknaF9hHvGcRCPl7PKf3nepYBDBZlSLAzNLTRNIz+ijCrYZ794jQsEat/lztEGhBEW
         IKXqINWjeg+OrZxDqd2MiOxNRpV04tOw3AMic9Fc2MUoKIztpKc6jpekmDtcsHvG3dTr
         XbRqEJ8CCPuTnNo43Ive6vL9MCkGIrQcHRIL+xKHN3LNcwPk6oPds3atZ6x/O25dDuCC
         1Pb8f2pauv93HmZuoKkWwBXJ27VkJRcBuLlW+Bf8MTJ/FOrnwfBfL+y08LYXW4r5G/Aq
         qgBA==
X-Received: by 10.50.82.103 with SMTP id h7mr4678178igy.5.1377453259474;
        Sun, 25 Aug 2013 10:54:19 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.3.103 with SMTP id b7ls1926623igb.2.canary; Sun, 25 Aug
 2013 10:54:18 -0700 (PDT)
X-Received: by 10.50.49.11 with SMTP id q11mr206468ign.12.1377453258645;
        Sun, 25 Aug 2013 10:54:18 -0700 (PDT)
In-Reply-To: <CAEn_SP+=gQwxB8RY6ZY6EDHD+gATtzYX_mrKwRZQDEcBcuO+ZQ@mail.gmail.com>
X-Original-Sender: potswa@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:5801
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5801>

The problem here is simply a library bug, be it the Standard Library or oth=
er. A constructor shouldn't be declared with no available definition. Some =
other places already state "this signature does not participate in overload=
 resolution..." and the principle needs more general application.

If a library defect hasn't been filed, that's the next order of business, b=
ut this may require a paper, too. The fix could be just adding a sentence t=
o the container requirements table.

Concepts simplify introspection a la wellformed() (it's called requires()) =
but it still only applies to immediate context. You don't want the overhead=
 of instantiating a definition during overload resolution, of a function th=
at might never be used.

Implementing SFINAE on a copy constructor is unfortunately harder than it s=
hould be, and I'm not aware of any fix in the pipeline. Two lightweight alt=
ernatives:

1. Implement the constructor in a base, and inherit from another base which=
 is conditionally copy-constructible, so the implicit definition of the der=
ived constructor is conditionally deleted.

2. Use std::conditional to replace the constructor parameter type with a ha=
rmless, unused tag.

--=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/.

.
