From patchwork Fri May 24 18:25:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 246278 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 153172C0483 for ; Sat, 25 May 2013 04:26:09 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=V2Rm1PjxvyRQ+PpW/rAfKOaaVpOcPHlZ0NQDokxOS1k W7QnsWEhg+Rj5rO96FarKwIJ4XRqdprzbR5MlLRvjqIGxU6ne42PAw4FBTgH4U0l rfm3AGkeCo2GhjWtDzs7lGzVDbLzLHEkKvMEcrTH5luln+/4igaAuxBogYN/icOI = 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 :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=7mx6VwkA/8v4i2/Kg5xOLesCBtk=; b=HPCDdmrGU4zhJ7EYp 8MP4QgcoirI0YjLXjkjo8N/B3zuymDCyhrPTlk4Lsa5vVWM0usx0/yFgQiv5Tzgc gNorI0Zz2O3Vcf7nxna8yM9JB8IO76lajUbKzYx7XHyfXr+3fgObifetJKL1VzbF LeVdfhLqhPX5KfKXKjPKafXTUg= Received: (qmail 18079 invoked by alias); 24 May 2013 18:26:04 -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 18059 invoked by uid 89); 24 May 2013 18:26:03 -0000 X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_HOSTKARMA_NO, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-User: qpsmtpd, 2 recipients Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 24 May 2013 18:26:02 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r4OIQ05f030726 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 24 May 2013 18:26:00 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r4OIPxfw002494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 24 May 2013 18:26:00 GMT Received: from abhmt117.oracle.com (abhmt117.oracle.com [141.146.116.69]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r4OIPx5o002491; Fri, 24 May 2013 18:25:59 GMT Received: from poldo4.casa (/79.43.214.122) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 24 May 2013 11:25:59 -0700 Message-ID: <519FB0B5.8070303@oracle.com> Date: Fri, 24 May 2013 20:25:57 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ , =?ISO-8859-1?Q?Daniel_Kr=FCgler?= Subject: [v3] Couple of tiny tweaks X-Virus-Found: No Hi, a couple of tiny tweaks that should reduce a bit the risk of confusions and subtle bugs (mostly suggested by Daniel, thanks!) Thanks, Paolo. //////////////// 2013-05-24 Paolo Carlini * include/ext/type_traits.h (__is_null_pointer): Add std::nullptr_t overload. * include/bits/cpp_type_traits.h (__is_fundamental): Remove, unused. Index: include/bits/cpp_type_traits.h =================================================================== --- include/bits/cpp_type_traits.h (revision 199306) +++ include/bits/cpp_type_traits.h (working copy) @@ -327,14 +327,6 @@ { }; // - // A fundamental type is `void' or and arithmetic type - // - template - struct __is_fundamental - : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > - { }; - - // // A scalar type is an arithmetic type or a pointer type // template Index: include/ext/type_traits.h =================================================================== --- include/ext/type_traits.h (revision 199306) +++ include/ext/type_traits.h (working copy) @@ -155,6 +155,11 @@ __is_null_pointer(_Type) { return false; } +#if __cplusplus >= 201103L + inline bool + __is_null_pointer(std::nullptr_t) + { return true; } +#endif // For complex and cmath template::__value>