public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/c++-contracts] c++: comments
@ 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:b141fc304e150b643a7e697881490cbc643cbf0e

commit b141fc304e150b643a7e697881490cbc643cbf0e
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Oct 18 17:08:51 2022 -0400

    c++: comments
    
    gcc/cp/ChangeLog:
    
            * contracts.h (enum contract_continuation): Add comment.
    
    libstdc++-v3/ChangeLog:
    
            * include/experimental/contract: Add comments.

Diff:
---
 gcc/cp/contracts.h                         | 1 +
 libstdc++-v3/include/experimental/contract | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/gcc/cp/contracts.h b/gcc/cp/contracts.h
index cf1890510b8..81b528397bc 100644
--- a/gcc/cp/contracts.h
+++ b/gcc/cp/contracts.h
@@ -59,6 +59,7 @@ checked_contract_p (contract_semantic cs)
   return cs >= CCS_NEVER;
 }
 
+/* Must match std::contract_violation_continuation_mode in <contract>.  */
 enum contract_continuation
 {
   NEVER_CONTINUE,
diff --git a/libstdc++-v3/include/experimental/contract b/libstdc++-v3/include/experimental/contract
index 8d49bf751da..a52c2a485cf 100644
--- a/libstdc++-v3/include/experimental/contract
+++ b/libstdc++-v3/include/experimental/contract
@@ -45,6 +45,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
+  // From P1332
   enum class contract_violation_continuation_mode {
     NEVER_CONTINUE, MAYBE_CONTINUE
   };
@@ -63,11 +64,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
                         contract_violation_continuation_mode __m)
       : _M_line(__l), _M_file(__f), _M_function(__fn), _M_comment(__c),
 	_M_level(__lv), _M_role(__r), _M_continue(__m) { }
+    // From N4820
     uint_least32_t line_number() const noexcept { return _M_line; }
     string_view file_name() const noexcept { return _M_file; }
     string_view function_name() const noexcept { return _M_function; }
     string_view comment() const noexcept { return _M_comment; }
     string_view assertion_level() const noexcept { return _M_level; }
+    // From P1332
     string_view assertion_role() const noexcept { return _M_role; }
     contract_violation_continuation_mode continuation_mode() const noexcept
     { return _M_continue; }

^ 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] c++: comments 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).