public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/c++-contracts] libstdc++: contracts support is experimental
@ 2022-10-21  1:23 Jason Merrill
  0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2022-10-21  1:23 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

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?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-21  1:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21  1:23 [gcc/devel/c++-contracts] libstdc++: contracts support is experimental Jason Merrill

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).