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] c++: comments Date: Fri, 21 Oct 2022 01:23:51 +0000 (GMT) [thread overview] Message-ID: <20221021012352.22F213858C54@sourceware.org> (raw) 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; }
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=20221021012352.22F213858C54@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).