From patchwork Sat Dec 16 12:30:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ville Voutilainen X-Patchwork-Id: 849503 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-469409-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="J5OA3zpk"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yzRVC1Yhmz9t2d for ; Sat, 16 Dec 2017 23:30:55 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=Ma2GU6TTDMbJq6+0HcB9+EHGsEDTYHm4ma2w+9bCYY547d TgbbuMZ75MRANOxMWpkk5MW858FHAEkIjLCCdRCjVwciJ6s2RMNEZbzCH9xQ7XBV yuK5evHWcbptdxYx9MGOPA0sX0uMbzNehCMvR5YtQuTPJ8wKIIE14tp6TW38M= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=fkHSoOJ1mEJtDX4YWNvC8i/yHEQ=; b=J5OA3zpkcX2QZ4nkWopJ NQnSmvItxUDCa1R+p4GZo+OLtvKH1Ey0/FjO4Ja+J7c0DWZp/+bJHtsaCR1liTuz tgxp+UFwjr8RNQMkxS/DqWU4NhG2Zy3SkAFDJNSy2liY7dweDOij5PJy/4X97Ywx DR9bzWwjjyljIawiqdD462Q= Received: (qmail 93083 invoked by alias); 16 Dec 2017 12:30:41 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 93055 invoked by uid 89); 16 Dec 2017 12:30:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-ot0-f171.google.com Received: from mail-ot0-f171.google.com (HELO mail-ot0-f171.google.com) (74.125.82.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 16 Dec 2017 12:30:37 +0000 Received: by mail-ot0-f171.google.com with SMTP id q3so9949217oth.2; Sat, 16 Dec 2017 04:30:37 -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=+Xc0sZyiF1hrSNfahxjfZnJB735lXifABh6xtkYRyHw=; b=qGeVIWzzVlns8vOQgA9vyYeJmL04UIOwpek9Go32bYDCRw3hJ3ANpxiBUO+O/3H9d7 h5/dMcaZoC5hAXhZFPItPQl8XJXdayNJPiO7f9Rb20Ch2+EcHAZ6EgCt9FJOcHGonWLm 7cf+N8370BysYp45VDDqPdO0K0yIYiI9tE+3Wd6iq26pJa6drk6b0y0lCeucUW1sf05p 00ssCl9Pr9hGzp29ZN8w9wSON/NVPWvnDOQFyR0wVM1uphv9e2l9c4KmraZtXyeaqkxE QiZJl4eC000VI40bAF9WfR8CSgMgxebH6UihZWXPHqJ+/uwmiT4D+ApnU4lb30HZERYm srrQ== X-Gm-Message-State: AKGB3mK/6yttElG+crP9JDRiQSATqwHwjYt4QRf7xxy6HrqcEDKb8VJP ZJRWGJ6Ugl40VNHEB2k3dkBsQX5UnOCGC9sw4lszSg== X-Google-Smtp-Source: ACJfBost4TiuCgh3g1FZdc7PqiQctlsKNaT+XzCM3VT2T/fpazP1wWmuvSgUZcZ1gr6XJK9GIOC679XHkYwzCWe00Kc= X-Received: by 10.157.13.225 with SMTP id 88mr10886026ots.338.1513427435367; Sat, 16 Dec 2017 04:30:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.7.99 with HTTP; Sat, 16 Dec 2017 04:30:34 -0800 (PST) From: Ville Voutilainen Date: Sat, 16 Dec 2017 14:30:34 +0200 Message-ID: Subject: [v3 PATCH] PR libstdc++/68430 To: gcc-patches@gcc.gnu.org, "libstdc++" The compiler-powered is_constructible that we have in gcc 8 is powerful enough to give the right answer to an is_constructible question that would be hard for a pure-library implementation to get right in a well-formed fashion. This is just adding a test for it. Tested on Linux-PPC64, OK for trunk? 2017-12-16 Ville Voutilainen PR libstdc++/68430 * testsuite/20_util/is_constructible/68430.cc: New. diff --git a/libstdc++-v3/testsuite/20_util/is_constructible/68430.cc b/libstdc++-v3/testsuite/20_util/is_constructible/68430.cc new file mode 100644 index 0000000..3f880b3 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_constructible/68430.cc @@ -0,0 +1,6 @@ +// { dg-do compile { target c++11 } } + +#include + +template struct Foo { Foo(T = nullptr) {} }; +static_assert(!std::is_constructible>::value, "");