From patchwork Thu Feb 6 11:31:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1234284 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-519030-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=wCQVoaIf; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MrjGHHlV; dkim-atps=neutral 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 48Cx8X3spWz9sRK for ; Thu, 6 Feb 2020 22:31:22 +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=UKRgpK4MKhX6adTDCEQ5atRRU7I0YjOZtxESR5OYY1iQ+76OcVrsX 0nneUihq9CkfXE0BEcwf5NK8ToBjahZgZI1b4h1/itV/seqkgpImoNfGzvz+jAR3 6J+jOis6EUVQuGYSUeYUp3DpjsYYJaQwP/xH/ilgXPRJbYeJmAj2rg= 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=6dVfz8pQjgw1W855ZqmOLG2b5bg=; b=wCQVoaIf/nenVQKER+4p LsDT0wDFhauZl3REtlAQ1yGFGuX8o2qR1vUfGoz15gssXlGHUmmNTFxp/1XSU5Jk dWD9T4H8jan1vHsjEcmK+RyjlEruSyAxuE4TnQwL+X98eHW8BWWpUEUWtjKc1Iod fm6phpHKWqYpMetnKP0bXb8= Received: (qmail 111714 invoked by alias); 6 Feb 2020 11:31:15 -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 111706 invoked by uid 89); 6 Feb 2020 11:31:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (207.211.31.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 06 Feb 2020 11:31:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580988672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=B5z7+o16ZQhj8k5WvPNiSHT2y/YsEdQIaL7tyWyVViI=; b=MrjGHHlVfuUQMX8jcncANhYxW1weGNHRnkTM4/DylgA+lq/FLvuoGQeU6fQc/4KtIp2g3c 1Ao0EDTfmZOr1tCdePygbVVSIkkoG2frbdfoipz7ShkGiyYvwpmesPrcc0ueGN2LqGVdJM A+Q+TLWESGPW1Y7r9pU2BEIuxdTM+CI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-405-gzT9JbNaMbuc3dSb_sC3Pw-1; Thu, 06 Feb 2020 06:31:06 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 381328024D3; Thu, 6 Feb 2020 11:31:05 +0000 (UTC) Received: from localhost (unknown [10.33.36.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id D956C8E5F8; Thu, 6 Feb 2020 11:31:04 +0000 (UTC) Date: Thu, 6 Feb 2020 11:31:04 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Remove redundant macro that is always empty Message-ID: <20200206113104.GA931015@redhat.com> MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline The __iter_swap class template and explicit specialization are only declared (and used) for C++03 so _GLIBCXX20_CONSTEXPR does nothing here. * include/bits/stl_algobase.h (__iter_swap, __iter_swap): Remove redundant _GLIBCXX20_CONSTEXPR. Tested x86_64-linux, committed to master. commit d1aa7705d59e56191c2ccc5594983d8fa0832718 Author: Jonathan Wakely Date: Thu Feb 6 10:45:38 2020 +0000 libstdc++: Remove redundant macro that is always empty The __iter_swap class template and explicit specialization are only declared (and used) for C++03 so _GLIBCXX20_CONSTEXPR does nothing here. * include/bits/stl_algobase.h (__iter_swap, __iter_swap): Remove redundant _GLIBCXX20_CONSTEXPR. diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index dc922a0f3d2..efda15f816e 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -139,7 +139,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __iter_swap { template - _GLIBCXX20_CONSTEXPR static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { @@ -155,14 +154,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __iter_swap { template - _GLIBCXX20_CONSTEXPR static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { swap(*__a, *__b); } }; -#endif +#endif // C++03 /** * @brief Swaps the contents of two iterators. @@ -205,6 +203,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION && __are_same<_ValueType2&, _ReferenceType2>::__value>:: iter_swap(__a, __b); #else + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 187. iter_swap underspecified swap(*__a, *__b); #endif }