From patchwork Thu Nov 18 11:04:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 72079 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 462EFB71AE for ; Thu, 18 Nov 2010 22:04:50 +1100 (EST) Received: (qmail 25270 invoked by alias); 18 Nov 2010 11:04:48 -0000 Received: (qmail 25255 invoked by uid 22791); 18 Nov 2010 11:04:48 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from vsmtp3.tin.it (HELO vsmtp3.tin.it) (212.216.176.223) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Nov 2010 11:04:42 +0000 Received: from [192.168.0.4] (79.52.194.223) by vsmtp3.tin.it (8.5.113) id 4BCE36060F2E74AC; Thu, 18 Nov 2010 12:04:39 +0100 Message-ID: <4CE50846.3090004@oracle.com> Date: Thu, 18 Nov 2010 12:04:38 +0100 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101026 SUSE/3.0.10 Thunderbird/3.0.10 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: [v3] Minor debug/formatter.h clean up 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 Hi, as noticed yesterday with Jon. Tested x86_64-linux check-debug, committed. Paolo. ////////////////////////// 2010-11-18 Paolo Carlini * include/debug/formatter.h (__truth): Remove, unused. (__is_same): Remove, include cpp_type_traits.h instead. (_Parameter::_Parameter(const _Safe_iterator<>&, const char*, _Is_iterator)): Adjust. * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant): Likewise. Index: include/debug/formatter.h =================================================================== --- include/debug/formatter.h (revision 166897) +++ include/debug/formatter.h (working copy) @@ -31,6 +31,7 @@ #define _GLIBCXX_DEBUG_FORMATTER_H 1 #include +#include #include namespace __gnu_debug @@ -40,21 +41,6 @@ template bool __check_singular(_Iterator&); - /** Determine if the two types are the same. */ - template - struct __is_same - { - static const bool value = false; - }; - - template - struct __is_same<_Type, _Type> - { - static const bool value = true; - }; - - template struct __truth { }; - class _Safe_sequence_base; template @@ -225,9 +211,9 @@ _M_variant._M_iterator._M_type = 0; #endif _M_variant._M_iterator._M_constness = - __is_same<_Safe_iterator<_Iterator, _Sequence>, - typename _Sequence::iterator>:: - value? __mutable_iterator : __const_iterator; + std::__are_same<_Safe_iterator<_Iterator, _Sequence>, + typename _Sequence::iterator>:: + __value ? __mutable_iterator : __const_iterator; _M_variant._M_iterator._M_sequence = __it._M_get_sequence(); #ifdef __GXX_RTTI _M_variant._M_iterator._M_seq_type = &typeid(_Sequence); Index: include/debug/safe_iterator.h =================================================================== --- include/debug/safe_iterator.h (revision 166897) +++ include/debug/safe_iterator.h (working copy) @@ -95,7 +95,7 @@ _M_constant() const { typedef typename _Sequence::const_iterator const_iterator; - return __is_same::value; + return std::__are_same::__value; } typedef std::iterator_traits<_Iterator> _Traits;