public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jason Merrill <jason@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc/devel/c++-contracts] libstdc++: contracts support is experimental Date: Fri, 21 Oct 2022 01:23:40 +0000 (GMT) [thread overview] Message-ID: <20221021012341.1FD183858D1E@sourceware.org> (raw) https://gcc.gnu.org/g:704294a049802609e24839cdacd99054654d8f2f commit 704294a049802609e24839cdacd99054654d8f2f Author: Jason Merrill <jason@redhat.com> Date: Tue Oct 18 12:40:35 2022 -0400 libstdc++: contracts support is experimental Since it got dropped from the standard, the header should move to experimental/. libstdc++-v3/ChangeLog: * include/std/contract: Moved to... * include/experimental/contract: ...here. * src/c++17/contract.cc * include/Makefile.am * include/Makefile.in: Adjust. gcc/testsuite/ChangeLog: * g++.dg/contracts/contracts14.C * g++.dg/contracts/contracts15.C * g++.dg/contracts/contracts16.C * g++.dg/contracts/contracts17.C: Header now experimental/contract. Diff: --- gcc/testsuite/g++.dg/contracts/contracts14.C | 2 +- gcc/testsuite/g++.dg/contracts/contracts15.C | 2 +- gcc/testsuite/g++.dg/contracts/contracts16.C | 2 +- gcc/testsuite/g++.dg/contracts/contracts17.C | 2 +- libstdc++-v3/src/c++17/contract.cc | 2 +- libstdc++-v3/include/Makefile.am | 2 +- libstdc++-v3/include/Makefile.in | 2 +- libstdc++-v3/include/{std => experimental}/contract | 1 - 8 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/g++.dg/contracts/contracts14.C b/gcc/testsuite/g++.dg/contracts/contracts14.C index cef8a322315..bda392a1f9d 100644 --- a/gcc/testsuite/g++.dg/contracts/contracts14.C +++ b/gcc/testsuite/g++.dg/contracts/contracts14.C @@ -3,7 +3,7 @@ // { dg-do run } // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" } #include <iostream> -#include <contract> +#include <experimental/contract> int __on_contract_violation (bool continue_, diff --git a/gcc/testsuite/g++.dg/contracts/contracts15.C b/gcc/testsuite/g++.dg/contracts/contracts15.C index bdab22b99fd..8110876286c 100644 --- a/gcc/testsuite/g++.dg/contracts/contracts15.C +++ b/gcc/testsuite/g++.dg/contracts/contracts15.C @@ -3,7 +3,7 @@ // { dg-do run } // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" } #include <iostream> -#include <contract> +#include <experimental/contract> int __on_contract_violation (bool continue_, diff --git a/gcc/testsuite/g++.dg/contracts/contracts16.C b/gcc/testsuite/g++.dg/contracts/contracts16.C index 67d9390b694..26172281767 100644 --- a/gcc/testsuite/g++.dg/contracts/contracts16.C +++ b/gcc/testsuite/g++.dg/contracts/contracts16.C @@ -3,7 +3,7 @@ // { dg-do run } // { dg-options "-std=c++2a -fcontracts" } #include <iostream> -#include <contract> +#include <experimental/contract> void handle_contract_violation(const std::contract_violation &violation) { std::cerr << "custom std::handle_contract_violation called:" diff --git a/gcc/testsuite/g++.dg/contracts/contracts17.C b/gcc/testsuite/g++.dg/contracts/contracts17.C index dbe03af05f7..099e0b2d03e 100644 --- a/gcc/testsuite/g++.dg/contracts/contracts17.C +++ b/gcc/testsuite/g++.dg/contracts/contracts17.C @@ -4,7 +4,7 @@ // { dg-do run } // { dg-options "-std=c++2a -fcontracts" } #include <iostream> -#include <contract> +#include <experimental/contract> void handle_contract_violation(const std::contract_violation &violation) { std::cerr << "custom std::handle_contract_violation called:" diff --git a/libstdc++-v3/src/c++17/contract.cc b/libstdc++-v3/src/c++17/contract.cc index 769e6d3b722..8c649b5aafd 100644 --- a/libstdc++-v3/src/c++17/contract.cc +++ b/libstdc++-v3/src/c++17/contract.cc @@ -22,7 +22,7 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. -#include <contract> +#include <experimental/contract> #include <iostream> #include <cstdlib> diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 041b01c1b1d..e2e489cb949 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -32,7 +32,6 @@ std_freestanding = \ ${std_srcdir}/bit \ ${std_srcdir}/bitset \ ${std_srcdir}/concepts \ - ${std_srcdir}/contract \ ${std_srcdir}/coroutine \ ${std_srcdir}/expected \ ${std_srcdir}/functional \ @@ -769,6 +768,7 @@ experimental_headers = \ ${experimental_srcdir}/array \ ${experimental_srcdir}/buffer \ ${experimental_srcdir}/chrono \ + ${experimental_srcdir}/contract \ ${experimental_srcdir}/deque \ ${experimental_srcdir}/executor \ ${experimental_srcdir}/forward_list \ diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index a1ef0911230..4010004eced 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -391,7 +391,6 @@ std_freestanding = \ ${std_srcdir}/bit \ ${std_srcdir}/bitset \ ${std_srcdir}/concepts \ - ${std_srcdir}/contract \ ${std_srcdir}/coroutine \ ${std_srcdir}/expected \ ${std_srcdir}/functional \ @@ -1116,6 +1115,7 @@ experimental_headers = \ ${experimental_srcdir}/array \ ${experimental_srcdir}/buffer \ ${experimental_srcdir}/chrono \ + ${experimental_srcdir}/contract \ ${experimental_srcdir}/deque \ ${experimental_srcdir}/executor \ ${experimental_srcdir}/forward_list \ diff --git a/libstdc++-v3/include/std/contract b/libstdc++-v3/include/experimental/contract similarity index 99% rename from libstdc++-v3/include/std/contract rename to libstdc++-v3/include/experimental/contract index 2eabb3190cd..611d9c6db82 100644 --- a/libstdc++-v3/include/std/contract +++ b/libstdc++-v3/include/experimental/contract @@ -23,7 +23,6 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. -// FIXME experimental // FIXME string_view vs. freestanding // FIXME remove on_contract_violation?
reply other threads:[~2022-10-21 1:23 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221021012341.1FD183858D1E@sourceware.org \ --to=jason@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).