From patchwork Thu Jan 8 13:27:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 426633 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5F1C8140140 for ; Fri, 9 Jan 2015 00:27:42 +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:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=SbtMTPaU3GhlZLcQucCuvB+fpprTahQZgmWGY+TOHQyv9DyipcbRc 8oUQmWRD4Orf5EbTa9HRj2Q1aGvOb8Mv76ADJCGZRyYoF0NbHoYYswHd/EoBiWxF BLU14WeFiP4C0LLZ33QU4UU+mlbf9SKBECuz7YjVqq1rmWA37YWr5M= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=ctMt6VjgAKrCZTmN0ne7takn5xA=; b=QQxrMPTOAczLjnLCW3w5 zIE9gSbnmilz2cOMiGzo5MF0XSpBE+h2/auaN+xfW6zeqarVCVhFQwffUlm+MQaY BzjtZuXfb+H9BI3ihrlnJkKRVjfj3WQ8UgSb/tVF5pxkUR7xLI7YStrAfD4JK78y oWb46OrUxKTE/9ep7TEtWVI= Received: (qmail 24830 invoked by alias); 8 Jan 2015 13:27:33 -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 24522 invoked by uid 89); 8 Jan 2015 13:27:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 08 Jan 2015 13:27:30 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t08DRTeN027623 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 8 Jan 2015 08:27:29 -0500 Received: from localhost (ovpn-112-20.ams2.redhat.com [10.36.112.20]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t08DRShh009554; Thu, 8 Jan 2015 08:27:28 -0500 Date: Thu, 8 Jan 2015 13:27:27 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [patch] Use std::__bool_constant instead of duplicating it Message-ID: <20150108132727.GJ3360@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) This is a tiny patch to use the new __bool_constant helper in hashtable_policy.h instead of defining another identical alias. Tested x86_64-linux, committed to trunk. commit 3fa3e0af59fa4371f61e95eeaab240d3b974b62e Author: Jonathan Wakely Date: Wed Apr 16 18:20:30 2014 +0100 * include/bits/hashtable_policy.h: Use __bool_constant. diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h index 1251ef0..14bcca6 100644 --- a/libstdc++-v3/include/bits/hashtable_policy.h +++ b/libstdc++-v3/include/bits/hashtable_policy.h @@ -81,7 +81,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Helper type used to detect whether the hash functor is noexcept. template - struct __is_noexcept_hash : std::integral_constant()(declval()))> { }; @@ -211,9 +211,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct _Hashtable_traits { - template - using __bool_constant = integral_constant; - using __hash_cached = __bool_constant<_Cache_hash_code>; using __constant_iterators = __bool_constant<_Constant_iterators>; using __unique_keys = __bool_constant<_Unique_keys>;