From patchwork Wed Dec 7 15:27:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 703637 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 3tYjFr1HrCz9t9x for ; Thu, 8 Dec 2016 02:33:51 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="bgweTj5/"; dkim-atps=neutral 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=dfzKp5sa6uxm4HKBLwkVemu87qMmYd1zE0xZ34xSbohkqbXfjwp8d oMB+xgWLzyk9yXcPlPZrTMP0q1aYUcDSHR3/rA1Bf2xMqS3YEnNCzcqovuSrRP5k 2WGZ0q/kjXvAv72WMXxvv8y72Fz91zDnfct8R/dQqI3OJTk2gq6EYs= 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=xGSLIs7yeL2JysJeVyLlPiOXU94=; b=bgweTj5/ZM83vKfpGyam x3dz70HT9dQtLU/pC2rj8sJs0LnJ4sWAIakWBSvwWg+SS7Z7vQw6ciPdOPCqmeDX vRhs3YfZeI25I04eiPuweSpyxlvOU++v5KGaijLEP6v+2SC2d+VeYtGv7g2w1gu/ 4+GPRxBcD/uyVo4ZZiIRy/I= Received: (qmail 78957 invoked by alias); 7 Dec 2016 15:27:51 -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 78208 invoked by uid 89); 7 Dec 2016 15:27:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=7215 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 ESMTP; Wed, 07 Dec 2016 15:27:17 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF93C7FD56; Wed, 7 Dec 2016 15:27:15 +0000 (UTC) Received: from localhost (ovpn-116-110.ams2.redhat.com [10.36.116.110]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uB7FREPg026536; Wed, 7 Dec 2016 10:27:15 -0500 Date: Wed, 7 Dec 2016 15:27:14 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH 1/2] Replace use of C++14 std::exchange in C++11 testcase Message-ID: <20161207152714.GA20510@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.7.1 (2016-10-04) This test fails when run with -std=gnu++11 * testsuite/28_regex/traits/char/user_defined.cc: Replace uses of C++14 std::exchange function. Tested x86_64-linux, committed to trunk. commit 897fb3679fda13a8ebda39cf8a60810b03f09e06 Author: Jonathan Wakely Date: Wed Dec 7 14:25:34 2016 +0000 Replace use of C++14 std::exchange in C++11 testcase * testsuite/28_regex/traits/char/user_defined.cc: Replace uses of C++14 std::exchange function. diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/user_defined.cc b/libstdc++-v3/testsuite/28_regex/traits/char/user_defined.cc index 5888ce1..d4f4abc 100644 --- a/libstdc++-v3/testsuite/28_regex/traits/char/user_defined.cc +++ b/libstdc++-v3/testsuite/28_regex/traits/char/user_defined.cc @@ -72,13 +72,15 @@ test01() VERIFY(!called_transform); basic_regex> re("[a]", regex::collate); VERIFY(regex_match("a", re)); - VERIFY(exchange(called_transform, false)); + VERIFY(called_transform); + called_transform = false; } { VERIFY(!called_nocase); basic_regex> re("[a]", regex::icase); VERIFY(regex_match("A", re)); - VERIFY(exchange(called_nocase, false)); + VERIFY(called_nocase); + called_nocase = false; } { basic_regex> re("[T-f]", regex::icase);