From patchwork Tue Nov 8 00:52:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 124229 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 5793D1007D4 for ; Tue, 8 Nov 2011 11:53:31 +1100 (EST) Received: (qmail 23586 invoked by alias); 8 Nov 2011 00:53:27 -0000 Received: (qmail 23569 invoked by uid 22791); 8 Nov 2011 00:53:26 -0000 X-SWARE-Spam-Status: No, hits=-2.7 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; Tue, 08 Nov 2011 00:53:13 +0000 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id pA80rCMm025326 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Nov 2011 00:53:12 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id pA80rBI4014596 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 8 Nov 2011 00:53:11 GMT Received: from abhmt111.oracle.com (abhmt111.oracle.com [141.146.116.63]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id pA80r6W3007893; Mon, 7 Nov 2011 18:53:06 -0600 Received: from [192.168.1.4] (/79.56.218.51) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 07 Nov 2011 16:53:05 -0800 Message-ID: <4EB87D66.9080106@oracle.com> Date: Tue, 08 Nov 2011 01:52:54 +0100 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: [v3] Small clean-up to 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, Marc noticed we had a few redundant const qualifiers. Tested x86_64-linux, committed. Paolo. ////////////////// 2011-11-07 Paolo Carlini * include/std/complex (complex<>::real(), complex<>::imag()): Remove redundant const qualifiers. Index: include/std/complex =================================================================== --- include/std/complex (revision 181138) +++ include/std/complex (working copy) @@ -142,10 +142,10 @@ // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 387. std::complex over-encapsulated. constexpr _Tp - real() const { return _M_real; } + real() { return _M_real; } constexpr _Tp - imag() const { return _M_imag; } + imag() { return _M_imag; } #else /// Return real part of complex number. _Tp& @@ -1062,10 +1062,10 @@ // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 387. std::complex over-encapsulated. constexpr float - real() const { return __real__ _M_value; } + real() { return __real__ _M_value; } constexpr float - imag() const { return __imag__ _M_value; } + imag() { return __imag__ _M_value; } #else float& real() { return __real__ _M_value; } @@ -1211,10 +1211,10 @@ // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 387. std::complex over-encapsulated. constexpr double - real() const { return __real__ _M_value; } + real() { return __real__ _M_value; } constexpr double - imag() const { return __imag__ _M_value; } + imag() { return __imag__ _M_value; } #else double& real() { return __real__ _M_value; } @@ -1361,10 +1361,10 @@ // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 387. std::complex over-encapsulated. constexpr long double - real() const { return __real__ _M_value; } + real() { return __real__ _M_value; } constexpr long double - imag() const { return __imag__ _M_value; } + imag() { return __imag__ _M_value; } #else long double& real() { return __real__ _M_value; }