public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/113320] libstdc++ accepts std::format(std::move(runtime_fmt), 42); Date: Fri, 12 Jan 2024 09:49:17 +0000 [thread overview] Message-ID: <bug-113320-4-St9zyEV4YB@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113320-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113320 --- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:5fbc1b2e7c1bdf11f64765b278f477310c0f3436 commit r14-7174-g5fbc1b2e7c1bdf11f64765b278f477310c0f3436 Author: Jonathan Wakely <jwakely@redhat.com> Date: Wed Jan 10 20:54:11 2024 +0000 libstdc++: Fix std::runtime_format deviations from the spec [PR113320] I seem to have implemented this feature based on the P2918R0 revision, not the final P2918R2 one that was approved for C++26. This commit fixes it. The runtime-format-string type should not have a publicly accessible data member, so add a constructor and make it a friend of basic_format_string. It should also be non-copyable, so that it can only be constructed from a prvalue via temporary materialization. Change the basic_format_string constructor parameter to pass by value. Also add noexcept to the constructors and runtime_format generator functions. libstdc++-v3/ChangeLog: PR libstdc++/113320 * include/std/format (__format::_Runtime_format_string): Add constructor and disable copy operations. (basic_format_string(_Runtime_format_string)): Add noexcept and take parameter by value not rvalue reference. (runtime_format): Add noexcept. * testsuite/std/format/runtime_format.cc: Check noexcept. Check that construction is only possible from prvalues, not xvalues. Reviewed-by: Daniel Krügler <daniel.kruegler@gmail.com>
next prev parent reply other threads:[~2024-01-12 9:49 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-11 1:19 [Bug libstdc++/113320] New: " hewillk at gmail dot com 2024-01-11 10:38 ` [Bug libstdc++/113320] " redi at gcc dot gnu.org 2024-01-11 22:50 ` redi at gcc dot gnu.org 2024-01-12 9:49 ` cvs-commit at gcc dot gnu.org [this message] 2024-01-12 20:38 ` redi at gcc dot gnu.org
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=bug-113320-4-St9zyEV4YB@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).