public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100465] New: Overloading operator+= and including filesystem causes conflicting overload compilation error
@ 2021-05-07  2:39 ramkapte at gmail dot com
  2021-05-07  2:49 ` [Bug c++/100465] " ramkapte at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: ramkapte at gmail dot com @ 2021-05-07  2:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100465
           Summary: Overloading operator+= and including filesystem causes
                    conflicting overload compilation error
           Product: gcc
           Version: 11.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ramkapte at gmail dot com
  Target Milestone: ---

Created attachment 50771
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50771&action=edit
Minimal example which cau

Adding an templated function overload for operator+= and including <filesystem>
causes a compilation error about conflicting overloads. The code works on GCC
versions <= 9.3 but does not work on GCC versions after that. The code works on
MSVC and Clang, so I believe this is a compiler bug. I'm not sure, but I don't
think the internal code of <filesystem> ought to be seeing the overload in the
global namespace.

See attached error.cpp for minimal example.

(Godbolt for error.cpp: https://godbolt.org/z/ccPvqf9K9 )

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-12-16 18:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07  2:39 [Bug c++/100465] New: Overloading operator+= and including filesystem causes conflicting overload compilation error 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
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

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).