From patchwork Sat Aug 17 02:39:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 1148569 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-507176-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="mDneDb0F"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=verizon.net header.i=@verizon.net header.b="VDhAg5/h"; 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 469PXX37GSz9s7T for ; Sat, 17 Aug 2019 12:39:21 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:reply-to:subject:message-id:date:mime-version :content-type; q=dns; s=default; b=gqrbu14aj6pvs0tMgZBlZBMgZJqRB J6FhW0pvDBoMMXLCpPeHiwtaJO3OZ5TfVNmFuVc9sG707anij417E0pnP85UzzFt RH67lqJn5HLYiBNHwK/idPM0libx9fStbuvJtbO+tH4rN03CLYxaJFoShRduA/x7 OpqiBE42lllfiM= 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:to :from:reply-to:subject:message-id:date:mime-version :content-type; s=default; bh=TwcJSDTUQVqgFb3ADAARRolY6qw=; b=mDn eDb0FyfcP5l3K8DeG6CY1lyfo761YtqwX4p3WUsMcYqTcafb00nl/HhHcMoO73oO uPL0DA8j2JIOBr4bJ6HZmwSacej4kh1YxvHOa4YXzOMXaxRnSSgWGDdfcwP/oTmi Do2xQR/GOahH+hRcbsnDTcfL7uOwXUxpt8bH5XvM= Received: (qmail 52970 invoked by alias); 17 Aug 2019 02:39:12 -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 52950 invoked by uid 89); 17 Aug 2019 02:39:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=H*MI:verizon, 274488, constexpr.cc, UD:constexpr.cc X-HELO: sonic314-15.consmr.mail.bf2.yahoo.com Received: from sonic314-15.consmr.mail.bf2.yahoo.com (HELO sonic314-15.consmr.mail.bf2.yahoo.com) (74.6.132.125) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 17 Aug 2019 02:39:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verizon.net; s=a2048; t=1566009544; bh=ktmz/+759UQbNTr1F4H9hZGcGL0JU3gYNvmTWGTAV5Q=; h=To:From:Subject:Date:From:Subject; b=VDhAg5/h0NZS2Dm21/np8eLxSPwSkKr1VzEGcgxmKv8cEgiVrjVtV48ZDVSoS4oB/cHsLMTKhIiyfBx5+W8ge86Vc8mKs+JmZx7dHJj+T6B/hOkpOfY4r2NGL+rTqacd/VItWZ5DqKfotTyp1liIfHDACVlbF2rLNQ0NPqxSo04Cnlk5UetsUlcRvRCpLgonTWv1cBZhaIE10fQY5qhZD4lOiBcJ4WAjKuGy2hSwytBqtgJrTfn2j0ePhJc3WvvmZ3TbR4rfrz+RCXF0bRzz3rcqQEcI4rXPCcGLKyEEythz/0jERBBHLyrdlPsF2y7K/diAgFmtqJO0/PsRC+gOvw== Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.bf2.yahoo.com with HTTP; Sat, 17 Aug 2019 02:39:04 +0000 Received: by smtp413.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 01303ad295fa06ecbe1c275b8dc23102; Sat, 17 Aug 2019 02:39:03 +0000 (UTC) To: "libstdc++@gcc.gnu.org" , Jonathan Wakely , gcc-patches , Jonathan Wakely X-Patchwork-Original-From: "Ed Smith-Rowland via gcc-patches" From: "Li, Pan2 via Gcc-patches" Reply-To: Ed Smith-Rowland <3dw4rd@verizon.net> Subject: Implement C++20 p1424 - 'constexpr' feature macro concerns. Message-ID: Date: Fri, 16 Aug 2019 22:39:03 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 The latest draft and I guess the above paper changed the macro names for the C++20 constexpr lib featues. __cpp_lib_constexpr_algorithms ->__cpp_lib_constexpr. This patch changes the name but not the date because I still have some work to do before I can ship the "miscellaneous" constexpr material. I would like to slot this patch in before that chunk 3 of the constexpr lib patch set rather than wait because it simplifies the testing of macros somewhat. I would also like to kill a non-standard macro pretty quickly. It is a trivial patch really and it built and tested cleanly on x86_64-linux. Ok for mainline? Ed 2019-08-19 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++20 p1424 - 'constexpr' feature macro concerns. * include/std/version (__cpp_lib_constexpr_algorithms): Change macro name to __cpp_lib_constexpr. * include/bits/algorithmfwd.h: Ditto. * include/std/utility: Ditto. * testsuite/25_algorithms/constexpr_macro.cc: Ditto. * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for __cpp_lib_constexpr macro in . * testsuite/20_util/exchange/constexpr.cc: Add check for __cpp_lib_constexpr macro in . * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for __cpp_lib_constexpr_algorithms (now __cpp_lib_constexpr) in . * testsuite/25_algorithms/all_of/constexpr.cc: Ditto. * testsuite/25_algorithms/any_of/constexpr.cc: Ditto. * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto. * testsuite/25_algorithms/copy/constexpr.cc: Ditto. * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto. * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto. * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto. * testsuite/25_algorithms/count/constexpr.cc: Ditto. * testsuite/25_algorithms/count_if/constexpr.cc: Ditto. * testsuite/25_algorithms/equal/constexpr.cc: Ditto. * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto. * testsuite/25_algorithms/fill/constexpr.cc: Ditto. * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto. * testsuite/25_algorithms/find/constexpr.cc: Ditto. * testsuite/25_algorithms/find_end/constexpr.cc: Ditto. * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto. * testsuite/25_algorithms/find_if/constexpr.cc: Ditto. * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto. * testsuite/25_algorithms/for_each/constexpr.cc: Ditto. * testsuite/25_algorithms/generate/constexpr.cc: Ditto. * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto. * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto. * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto. * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto. * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto. * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto. * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto. * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto. * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto. * testsuite/25_algorithms/merge/constexpr.cc: Ditto. * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto. * testsuite/25_algorithms/none_of/constexpr.cc: Ditto. * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto. * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto. * testsuite/25_algorithms/remove/constexpr.cc: Ditto. * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto. * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto. * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto. * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto. * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto. * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto. * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto. * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto. * testsuite/25_algorithms/search/constexpr.cc: Ditto. * testsuite/25_algorithms/search_n/constexpr.cc: Ditto. * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto. * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto. * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto. * testsuite/25_algorithms/set_union/constexpr.cc: Ditto. * testsuite/25_algorithms/transform/constexpr.cc: Ditto. * testsuite/25_algorithms/unique/constexpr.cc: Ditto. * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto. * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto. Index: include/bits/algorithmfwd.h =================================================================== --- include/bits/algorithmfwd.h (revision 274488) +++ include/bits/algorithmfwd.h (working copy) @@ -192,7 +192,7 @@ // adjacent_find #if __cplusplus > 201703L -# define __cpp_lib_constexpr_algorithms 201711L +# define __cpp_lib_constexpr 201711L # define __cpp_lib_constexpr_swap_algorithms 201806L #endif Index: include/std/utility =================================================================== --- include/std/utility (revision 274488) +++ include/std/utility (working copy) @@ -281,7 +281,7 @@ #define __cpp_lib_exchange_function 201304 #if __cplusplus > 201703L -# define __cpp_lib_constexpr_algorithms 201711L +# define __cpp_lib_constexpr 201711L #endif /// Assign @p __new_val to @p __obj and return its previous value. Index: include/std/version =================================================================== --- include/std/version (revision 274488) +++ include/std/version (working copy) @@ -153,7 +153,7 @@ #define __cpp_lib_atomic_ref 201806L #define __cpp_lib_bind_front 201907L #define __cpp_lib_bounded_array_traits 201902L -#define __cpp_lib_constexpr_algorithms 201711L +#define __cpp_lib_constexpr 201711L #define __cpp_lib_constexpr_swap_algorithms 201806L #if __cpp_impl_destroying_delete # define __cpp_lib_destroying_delete 201806L Index: testsuite/20_util/exchange/constexpr.cc =================================================================== --- testsuite/20_util/exchange/constexpr.cc (revision 274488) +++ testsuite/20_util/exchange/constexpr.cc (working copy) @@ -20,6 +20,12 @@ #include +#ifndef __cpp_lib_constexpr +# error "Feature-test macro for constexpr algorithms missing" +#elif __cpp_lib_constexpr < 201711L +# error "Feature-test macro for constexpr algorithms has wrong value" +#endif + constexpr bool test() { Index: testsuite/25_algorithms/adjacent_find/constexpr.cc =================================================================== --- testsuite/25_algorithms/adjacent_find/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/adjacent_find/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array car{{0, 1, 2, 3, 4, 5, 6, 6, 8, 9, 9, 11}}; constexpr auto out0x = std::adjacent_find(car.begin(), car.end()); Index: testsuite/25_algorithms/all_of/constexpr.cc =================================================================== --- testsuite/25_algorithms/all_of/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/all_of/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array cae{{0, 2, 4, 6, 8, 10}}; constexpr auto out2 = std::all_of(cae.begin(), cae.end(), Index: testsuite/25_algorithms/any_of/constexpr.cc =================================================================== --- testsuite/25_algorithms/any_of/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/any_of/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/binary_search/constexpr.cc =================================================================== --- testsuite/25_algorithms/binary_search/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/binary_search/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/constexpr_macro.cc =================================================================== --- testsuite/25_algorithms/constexpr_macro.cc (revision 274488) +++ testsuite/25_algorithms/constexpr_macro.cc (working copy) @@ -20,8 +20,8 @@ #include -#ifndef __cpp_lib_constexpr_algorithms +#ifndef __cpp_lib_constexpr # error "Feature-test macro for constexpr algorithms missing in " -#elif __cpp_lib_constexpr_algorithms != 201711L +#elif __cpp_lib_constexpr != 201711L # error "Feature-test macro for constexpr algorithms has wrong value in " #endif Index: testsuite/25_algorithms/copy/constexpr.cc =================================================================== --- testsuite/25_algorithms/copy/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/copy/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/copy_backward/constexpr.cc =================================================================== --- testsuite/25_algorithms/copy_backward/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/copy_backward/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/copy_if/constexpr.cc =================================================================== --- testsuite/25_algorithms/copy_if/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/copy_if/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr bool Index: testsuite/25_algorithms/copy_n/constexpr.cc =================================================================== --- testsuite/25_algorithms/copy_n/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/copy_n/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr bool Index: testsuite/25_algorithms/count/constexpr.cc =================================================================== --- testsuite/25_algorithms/count/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/count/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/count_if/constexpr.cc =================================================================== --- testsuite/25_algorithms/count_if/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/count_if/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr auto out9 = std::count_if(ca0.begin(), ca0.end(), Index: testsuite/25_algorithms/cpp_lib_constexpr.cc =================================================================== --- testsuite/25_algorithms/cpp_lib_constexpr.cc (nonexistent) +++ testsuite/25_algorithms/cpp_lib_constexpr.cc (working copy) @@ -0,0 +1,27 @@ +// Copyright (C) 2019 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-options "-std=gnu++2a" } +// { dg-do compile { target c++2a } } + +#include + +#ifndef __cpp_lib_constexpr +# error "Feature-test macro for constexpr algorithms missing" +#elif __cpp_lib_constexpr < 201711L +# error "Feature-test macro for constexpr algorithms has wrong value" +#endif Index: testsuite/25_algorithms/equal/constexpr.cc =================================================================== --- testsuite/25_algorithms/equal/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/equal/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/equal_range/constexpr.cc =================================================================== --- testsuite/25_algorithms/equal_range/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/equal_range/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/fill/constexpr.cc =================================================================== --- testsuite/25_algorithms/fill/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/fill/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/fill_n/constexpr.cc =================================================================== --- testsuite/25_algorithms/fill_n/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/fill_n/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/find/constexpr.cc =================================================================== --- testsuite/25_algorithms/find/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/find/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr auto oute = std::find(ca0.begin(), ca0.end(), 5); Index: testsuite/25_algorithms/find_end/constexpr.cc =================================================================== --- testsuite/25_algorithms/find_end/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/find_end/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/find_first_of/constexpr.cc =================================================================== --- testsuite/25_algorithms/find_first_of/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/find_first_of/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr std::array cas{{3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}}; Index: testsuite/25_algorithms/find_if/constexpr.cc =================================================================== --- testsuite/25_algorithms/find_if/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/find_if/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/find_if_not/constexpr.cc =================================================================== --- testsuite/25_algorithms/find_if_not/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/find_if_not/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr auto outk = std::find_if_not(ca0.begin(), ca0.end(), Index: testsuite/25_algorithms/for_each/constexpr.cc =================================================================== --- testsuite/25_algorithms/for_each/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/for_each/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr bool Index: testsuite/25_algorithms/generate/constexpr.cc =================================================================== --- testsuite/25_algorithms/generate/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/generate/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/generate_n/constexpr.cc =================================================================== --- testsuite/25_algorithms/generate_n/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/generate_n/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/is_heap/constexpr.cc =================================================================== --- testsuite/25_algorithms/is_heap/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/is_heap/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - // heap constexpr std::array ah{{22, Index: testsuite/25_algorithms/is_heap_until/constexpr.cc =================================================================== --- testsuite/25_algorithms/is_heap_until/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/is_heap_until/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - // heap constexpr std::array ahu{{22, Index: testsuite/25_algorithms/is_partitioned/constexpr.cc =================================================================== --- testsuite/25_algorithms/is_partitioned/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/is_partitioned/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/is_permutation/constexpr.cc =================================================================== --- testsuite/25_algorithms/is_permutation/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/is_permutation/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/is_sorted/constexpr.cc =================================================================== --- testsuite/25_algorithms/is_sorted/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/is_sorted/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr auto outv = std::is_sorted(ca0.begin(), ca0.end()); Index: testsuite/25_algorithms/is_sorted_until/constexpr.cc =================================================================== --- testsuite/25_algorithms/is_sorted_until/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/is_sorted_until/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/lexicographical_compare/constexpr.cc =================================================================== --- testsuite/25_algorithms/lexicographical_compare/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/lexicographical_compare/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/lower_bound/constexpr.cc =================================================================== --- testsuite/25_algorithms/lower_bound/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/lower_bound/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/merge/constexpr.cc =================================================================== --- testsuite/25_algorithms/merge/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/merge/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/mismatch/constexpr.cc =================================================================== --- testsuite/25_algorithms/mismatch/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/mismatch/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/none_of/constexpr.cc =================================================================== --- testsuite/25_algorithms/none_of/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/none_of/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/partition_copy/constexpr.cc =================================================================== --- testsuite/25_algorithms/partition_copy/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/partition_copy/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/partition_point/constexpr.cc =================================================================== --- testsuite/25_algorithms/partition_point/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/partition_point/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array caeo{{0, 2, 4, 6, 8, 10, 1, 3, 5, 7, 9, 11}}; constexpr bool Index: testsuite/25_algorithms/remove/constexpr.cc =================================================================== --- testsuite/25_algorithms/remove/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/remove/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/remove_copy/constexpr.cc =================================================================== --- testsuite/25_algorithms/remove_copy/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/remove_copy/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/remove_copy_if/constexpr.cc =================================================================== --- testsuite/25_algorithms/remove_copy_if/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/remove_copy_if/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/remove_if/constexpr.cc =================================================================== --- testsuite/25_algorithms/remove_if/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/remove_if/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/replace_copy/constexpr.cc =================================================================== --- testsuite/25_algorithms/replace_copy/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/replace_copy/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr bool Index: testsuite/25_algorithms/replace_copy_if/constexpr.cc =================================================================== --- testsuite/25_algorithms/replace_copy_if/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/replace_copy_if/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr bool test() Index: testsuite/25_algorithms/replace_if/constexpr.cc =================================================================== --- testsuite/25_algorithms/replace_if/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/replace_if/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/reverse_copy/constexpr.cc =================================================================== --- testsuite/25_algorithms/reverse_copy/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/reverse_copy/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/rotate_copy/constexpr.cc =================================================================== --- testsuite/25_algorithms/rotate_copy/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/rotate_copy/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/search/constexpr.cc =================================================================== --- testsuite/25_algorithms/search/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/search/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/search_n/constexpr.cc =================================================================== --- testsuite/25_algorithms/search_n/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/search_n/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array car{{0, 1, 2, 3, 4, 5, 6, 6, 8, 9, 9, 11}}; constexpr auto outuu = std::search_n(car.begin(), car.end(), 2, 6); Index: testsuite/25_algorithms/set_difference/constexpr.cc =================================================================== --- testsuite/25_algorithms/set_difference/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/set_difference/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/set_intersection/constexpr.cc =================================================================== --- testsuite/25_algorithms/set_intersection/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/set_intersection/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/set_symmetric_difference/constexpr.cc =================================================================== --- testsuite/25_algorithms/set_symmetric_difference/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/set_symmetric_difference/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/set_union/constexpr.cc =================================================================== --- testsuite/25_algorithms/set_union/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/set_union/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/transform/constexpr.cc =================================================================== --- testsuite/25_algorithms/transform/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/transform/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr bool test() Index: testsuite/25_algorithms/unique/constexpr.cc =================================================================== --- testsuite/25_algorithms/unique/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/unique/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/unique_copy/constexpr.cc =================================================================== --- testsuite/25_algorithms/unique_copy/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/unique_copy/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { Index: testsuite/25_algorithms/upper_bound/constexpr.cc =================================================================== --- testsuite/25_algorithms/upper_bound/constexpr.cc (revision 274488) +++ testsuite/25_algorithms/upper_bound/constexpr.cc (working copy) @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() {