From patchwork Thu Dec 29 22:04:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 133597 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]) by ozlabs.org (Postfix) with SMTP id 7B811B6FA4 for ; Fri, 30 Dec 2011 09:05:47 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1325801148; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Message-ID:Date:From:User-Agent:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=6gz6zPXWzX8DglxWgdNLDmHtbm0=; b=nqVXAhgpypx0Z436NpYt47XZ5q8myQMcVcLvRYEJ3X+ubE46NK09z6EWwcIxdB cmr2f00jANHJ7cGb3hrxeRrZhsOdkBuliUsCgeeuBNIkdo/MYrv2BJ7MGGGjgqbm q8XiA4vw/EuU/xfcPQ0aK1PcDUuWMV2AjrOU8DRKGoBIg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=TPR6kSdcC11EpsjGX+H1tuCaAvjdonewSBJI2uwySiO1S1qA1MW1qB5qq7GZsV YCKsrkAZQ2FrDhNfOD8wheqAo59xTj2hwoc+jvgE5jhW5vgqgPyyVnbjN40Gx5RQ 2c/QDSezIAGQHcGH4iqjdXwPxBoauNxnNhuzLjalcDJzc=; Received: (qmail 15623 invoked by alias); 29 Dec 2011 22:05:38 -0000 Received: (qmail 15610 invoked by uid 22791); 29 Dec 2011 22:05:36 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from rcsinet15.oracle.com (HELO rcsinet15.oracle.com) (148.87.113.117) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Dec 2011 22:05:23 +0000 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id pBTM5LoL018438 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 29 Dec 2011 22:05:22 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id pBTM5KOB028183 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Dec 2011 22:05:21 GMT Received: from abhmt116.oracle.com (abhmt116.oracle.com [141.146.116.68]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id pBTM5KOg006568; Thu, 29 Dec 2011 16:05:20 -0600 Received: from [192.168.1.4] (/79.52.209.45) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 29 Dec 2011 14:05:20 -0800 Message-ID: <4EFCE3E8.2010306@oracle.com> Date: Thu, 29 Dec 2011 23:04:24 +0100 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111219 Thunderbird/9.0 MIME-Version: 1.0 To: Oleg Endo CC: libstdc++@gcc.gnu.org, =?UTF-8?B?RnJhbsOnb2lzIER1bW9udA==?= , gcc-patches@gcc.gnu.org Subject: Re: RE :Re: RE :Re: hashtable local iterator References: <178044935.53839.1324627267265.JavaMail.seven@ap8.p7.uk.7sys.net> <4EF5EBD5.1050600@gmail.com> <4EF9A797.30900@oracle.com> <4EFAE355.3050109@gmail.com> <4EFB064D.1020207@oracle.com> <4EFCAAC4.8030709@gmail.com> <1325191450.18753.711.camel@yam-132-YW-E178-FTW> <1325194404.18753.714.camel@yam-132-YW-E178-FTW> <4EFCDD44.2000905@oracle.com> In-Reply-To: <4EFCDD44.2000905@oracle.com> X-IsSubscribed: yes 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 ... applied the below (sanity checked x86_64-linux). Thanks, Paolo. /////////////////// 2011-12-29 Paolo Carlini * include/bits/hashtable_policy.h (struct _Ebo_helper<>): Don't use _N, badname on Solaris; minor stylistic changes. Index: include/bits/hashtable_policy.h =================================================================== --- include/bits/hashtable_policy.h (revision 182733) +++ include/bits/hashtable_policy.h (working copy) @@ -515,45 +515,45 @@ // Helper class using EBO when it is not forbidden, type is not final, // and when it worth it, type is empty. - template struct _Ebo_helper; - // Specialization using EBO - template - struct _Ebo_helper<_N, _Tp, true> : _Tp + // Specialization using EBO. + template + struct _Ebo_helper<_Nm, _Tp, true> : _Tp { _Ebo_helper() = default; _Ebo_helper(const _Tp& __tp) : _Tp(__tp) { } static const _Tp& - _S_cget(const _Ebo_helper<_N, _Tp, true>& __eboh) + _S_cget(const _Ebo_helper& __eboh) { return static_cast(__eboh); } static _Tp& - _S_get(_Ebo_helper<_N, _Tp, true>& __eboh) + _S_get(_Ebo_helper& __eboh) { return static_cast<_Tp&>(__eboh); } }; - // Specialization not using EBO - template - struct _Ebo_helper<_N, _Tp, false> + // Specialization not using EBO. + template + struct _Ebo_helper<_Nm, _Tp, false> { _Ebo_helper() = default; - _Ebo_helper(const _Tp& __tp) : m_tp(__tp) + _Ebo_helper(const _Tp& __tp) : __m_tp(__tp) { } static const _Tp& - _S_cget(const _Ebo_helper<_N, _Tp, false>& __eboh) - { return __eboh.m_tp; } + _S_cget(const _Ebo_helper& __eboh) + { return __eboh.__m_tp; } static _Tp& - _S_get(_Ebo_helper<_N, _Tp, false>& __eboh) - { return __eboh.m_tp; } + _S_get(_Ebo_helper& __eboh) + { return __eboh.__m_tp; } private: - _Tp m_tp; + _Tp __m_tp; }; // Class template _Hash_code_base. Encapsulates two policy issues that @@ -583,7 +583,7 @@ template struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false> - : _Ebo_helper<0, _ExtractKey>, _Ebo_helper<1, _Hash> + : _Ebo_helper<0, _ExtractKey>, _Ebo_helper<1, _Hash> { private: typedef _Ebo_helper<0, _ExtractKey> _EboExtractKey; @@ -655,7 +655,7 @@ typename _H1, typename _H2> struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Default_ranged_hash, false> - : _Ebo_helper<0, _ExtractKey>, _Ebo_helper<1, _H1>, _Ebo_helper<2, _H2> + : _Ebo_helper<0, _ExtractKey>, _Ebo_helper<1, _H1>, _Ebo_helper<2, _H2> { private: typedef _Ebo_helper<0, _ExtractKey> _EboExtractKey; @@ -732,7 +732,7 @@ typename _H1, typename _H2> struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Default_ranged_hash, true> - : _Ebo_helper<0, _ExtractKey>, _Ebo_helper<1, _H1>, _Ebo_helper<2, _H2> + : _Ebo_helper<0, _ExtractKey>, _Ebo_helper<1, _H1>, _Ebo_helper<2, _H2> { private: typedef _Ebo_helper<0, _ExtractKey> _EboExtractKey; @@ -835,9 +835,9 @@ typename _H1, typename _H2, typename _Hash, bool __cache_hash_code> struct _Hashtable_base - : _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, - __cache_hash_code>, - _Ebo_helper<0, _Equal> + : _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, + __cache_hash_code>, + _Ebo_helper<0, _Equal> { private: typedef _Ebo_helper<0, _Equal> _EboEqual;