From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19556 invoked by alias); 18 Dec 2016 11:33:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 19527 invoked by uid 89); 18 Dec 2016 11:33:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Adjust, H*RU:sk:mail-vk, H*r:sk:mail-vk, Hx-spam-relays-external:sk:mail-vk X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-vk0-f47.google.com Received: from mail-vk0-f47.google.com (HELO mail-vk0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 18 Dec 2016 11:33:48 +0000 Received: by mail-vk0-f47.google.com with SMTP id 137so109242393vkl.0; Sun, 18 Dec 2016 03:33:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=TrmwT7d8TXYqhxsla26ONVF78WBzM6w5LNfPLwn8LBo=; b=ua6pFV1fiMARIE0+C6Db8Mu1+XATZ89RbgCuu3QIqYlVs0LzHtc7yAC/L+3x2/Oph2 UpyYXs1yRP1IpPNedcwsLkajVLkyPuRzDDiQhxHqJSlPNGM5SwlRLv2DblXxoIASxHqf K/1isBevdnK8XaAUHKBIYsUuUsxl1etILcSpUsZPx47gQyEBERr9QvtunKhaP2/mHbOd exKtkIuiq+CHx+KoPxOXL9rrxyg4/DDu6uN+jNcUNsK4F4NLR0/trDqjVZIfJ3TPcVmj mFb2bJo/7vNP34zrL92jHxl3/VVn04plOazzGAVA5mXsrXwE7O/Xix9NraF74lMaexRh uHkg== X-Gm-Message-State: AIkVDXJee+g4Ltm1N42k8Z+cydGAc5EIAcwO+/u1VbS1ll4ZsAOwayejjYs8CNOUW5nihhOgI0ybAhOWnqklNw== X-Received: by 10.31.176.9 with SMTP id z9mr4450343vke.9.1482060826100; Sun, 18 Dec 2016 03:33:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.50.74 with HTTP; Sun, 18 Dec 2016 03:33:45 -0800 (PST) From: Ville Voutilainen Date: Sun, 18 Dec 2016 12:11:00 -0000 Message-ID: Subject: [v3 PATCH] Make the perfect-forwarding constructor of a two-element tuple sfinae away when the first argument is an allocator_arg. To: "libstdc++" , "gcc-patches@gcc.gnu.org" Content-Type: multipart/mixed; boundary=001a11439e5a1371070543ed2dcf X-SW-Source: 2016-12/txt/msg01557.txt.bz2 --001a11439e5a1371070543ed2dcf Content-Type: text/plain; charset=UTF-8 Content-length: 675 Andrzej Krzemienski pointed this out in a discussion related to any and tags. Our two-element tuple specialization doesn't make the perfect-forwarding constructor and the allocator constructor properly mutually exclusive; this patch fixes that. Tested on Linux-x64, ok for trunk, gcc-6 and gcc-5? 2016-12-18 Ville Voutilainen Make the perfect-forwarding constructor of a two-element tuple sfinae away when the first argument is an allocator_arg. * include/std/tuple (tuple(_U1&&, _U2&&)): Constrain. * testsuite/20_util/tuple/cons/allocator_with_any.cc: New. * testsuite/20_util/tuple/element_access/get_neg.cc: Adjust. --001a11439e5a1371070543ed2dcf Content-Type: text/plain; charset=US-ASCII; name="tuple_alloc_any.diff" Content-Disposition: attachment; filename="tuple_alloc_any.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iwukpply0 Content-length: 4588 ZGlmZiAtLWdpdCBhL2xpYnN0ZGMrKy12My9pbmNsdWRlL3N0ZC90dXBsZSBi L2xpYnN0ZGMrKy12My9pbmNsdWRlL3N0ZC90dXBsZQppbmRleCAxM2UwYmY4 Li45ZGJkZDhkIDEwMDY0NAotLS0gYS9saWJzdGRjKystdjM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