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++/100630] Unexpected implicit conversion from volatile bool& to std::filesystem::path in gcc <= 10 Date: Mon, 17 May 2021 20:52:27 +0000 [thread overview] Message-ID: <bug-100630-4-Dow7KHn83B@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100630-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100630 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:f8d2cef5c544dd0196ec5a6f479fbf96d2214d76 commit r11-8425-gf8d2cef5c544dd0196ec5a6f479fbf96d2214d76 Author: Jonathan Wakely <jwakely@redhat.com> Date: Mon May 17 11:54:06 2021 +0100 libstdc++: Fix filesystem::path constraints for volatile [PR 100630] The constraint check for filesystem::path construction uses decltype(__is_path_src(declval<Source>())) which mean it considers conversion from an rvalue. When Source is a volatile-qualified type it cannot use is_path_src(const Unknown&) because a const lvalue reference can only bind to a non-volatile rvalue. Since the relevant path members all have a const Source& parameter, the constraint should be defined in terms of declval<const Source&>(), not declval<Source>(). This avoids the problem of volatile-qualified rvalues, because we no longer use an rvalue at all. libstdc++-v3/ChangeLog: PR libstdc++/100630 * include/experimental/bits/fs_path.h (__is_constructible_from): Test construction from a const lvalue, not an rvalue. * testsuite/27_io/filesystem/path/construct/100630.cc: New test. * testsuite/experimental/filesystem/path/construct/100630.cc: New test. (cherry picked from commit 45aa7a447652e8541cc381d7ab128544f81ed857)
next prev parent reply other threads:[~2021-05-17 20:52 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-17 0:13 [Bug libstdc++/100630] New: " romain.geissler at amadeus dot com 2021-05-17 9:18 ` [Bug libstdc++/100630] " redi at gcc dot gnu.org 2021-05-17 14:01 ` cvs-commit at gcc dot gnu.org 2021-05-17 17:11 ` cvs-commit at gcc dot gnu.org 2021-05-17 20:52 ` cvs-commit at gcc dot gnu.org [this message] 2021-05-19 12:44 ` romain.geissler at amadeus dot com 2021-05-19 14:04 ` redi at gcc dot gnu.org 2021-06-18 14:43 ` cvs-commit at gcc dot gnu.org 2021-06-18 14:46 ` 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-100630-4-Dow7KHn83B@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).