public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/100465] Overloading operator+= and including filesystem causes conflicting overload compilation error
Date: Fri, 07 May 2021 14:35:34 +0000	[thread overview]
Message-ID: <bug-100465-4-QcXSd8nW4i@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100465-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100465

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-05-07
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The difference is this change from g:e7406c364496dae51ef294b5720923fe4a1dfccb

@@ -1082,7 +1085,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
 #endif
              if (__add_slash)
                __str += __slash;
-             __str += __elem._M_pathname;
+             __str += basic_string_view<value_type>(__elem._M_pathname);
              __add_slash = __elem._M_type() == _Type::_Filename;
            }
        }

Previously it was adding a std::string to a basic_string<char,
char_traits<char>, Alloc>, which only worked if the Alloc was
std::allocator<char>.

The change to use string_view is required, but results in this error. I'll try
to reduce the testcase.

  parent reply	other threads:[~2021-05-07 14:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07  2:39 [Bug c++/100465] New: " ramkapte at gmail dot com
2021-05-07  2:49 ` [Bug c++/100465] " ramkapte at gmail dot com
2021-05-07 14:28 ` redi at gcc dot gnu.org
2021-05-07 14:35 ` redi at gcc dot gnu.org [this message]
2021-05-07 14:41 ` redi at gcc dot gnu.org
2021-05-07 14:56 ` redi at gcc dot gnu.org
2021-11-25 14:24 ` redi at gcc dot gnu.org
2021-11-29 16:38 ` ppalka at gcc dot gnu.org
2021-12-16 18:41 ` cvs-commit at gcc dot gnu.org
2021-12-16 18:43 ` ppalka 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-100465-4-QcXSd8nW4i@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: link
Be 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).