[Bug c++/103684] New: Ambiguous template template overload resolution
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103684 Bug ID: 103684 Summary: Ambiguous template template overload resolution Product: gcc Version: 11.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: weidmann at acm dot org Target Milestone: --- The following code compiles with -std=c++11, but does not with -std=c++17. Works with clang. #include #include template typename T> constexpr std::size_t hello() { return 2; } template typename T> constexpr std::size_t hello() { return 3; } void foo() { auto i = hello(); auto j = hello(); }
[Bug c++/103684] Ambiguous template template overload resolution
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103684 --- Comment #3 from Nicolas Weidmann --- Ok, thanks for the update!
[Bug libstdc++/114866] New: & out_ptr in freestanding
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114866 Bug ID: 114866 Summary: & out_ptr in freestanding Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: weidmann at acm dot org Target Milestone: --- With gcc version 14.0.1 20240411 (Red Hat 14.0.1-0) (GCC) on x86_64 GNU/Linux. Using the following command options: g++ -std=c++23 -fno-rtti -fno-exceptions -fno-non-call-exceptions -fno-unwind-tables -fno-use-cxa-atexit -fno-enforce-eh-specs -faligned-new -fsized-deallocation -fpermissive -m32 -ffreestanding -fomit-frame-pointer -Os -fno-asynchronous-unwind-tables -fno-builtin -Wall -fanalyzer I get the following error: In file included from /usr/include/c++/14/memory:95, ... /usr/include/c++/14/bits/out_ptr.h:57:22: error: ‘__is_shared_ptr’ was not declared in this scope 57 | static_assert(!__is_shared_ptr<_Smart> || sizeof...(_Args) != 0, Is #if _GLIBCXX_HOSTED missing around #if __cplusplus > 202002L # include #endif > As a quick workaround for building my project, I define #define > _GLIBCXX_OUT_PTR_H before including
[Bug c++/117281] New: Concepts and variadic template: internal compiler error
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117281 Bug ID: 117281 Summary: Concepts and variadic template: internal compiler error Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: weidmann at acm dot org Target Milestone: --- g++ (Compiler-Explorer-Build-gcc--binutils-2.42) 14.2.0 Getting an internal compiler error when compiling the following code with 'g++ -std=c++20' #include #include template using always_string = std::string; template typename T> struct first_ok { T value; }; first_ok first; template typename T> struct second_ok { T value; }; second_ok second; template typename T> struct triggers_bug { T value; }; triggers_bug bad;