[Bug c++/113272] Wrong specialization of class template selected

2024-01-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113272 --- Comment #3 from Andrew Pinski --- Ok, this behavior is interesting: ``` int g = 0; int g1 = 0; template struct A { void f() { g++; } }; template < const auto * a> struct A{ void f(){ g1++; } }; int x = 0; const int x1 = 0; int main()

[Bug c++/113272] Wrong specialization of class template selected

2024-01-09 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113272 --- Comment #2 from Fedor Chelnokov --- Here is simplified program without #include : template struct A {}; template requires requires(){ *p = 0; } struct A {}; int x = 0; struct B : A<&x>, A<(const int *)&x> {}; GCC fails here because o

[Bug c++/113272] Wrong specialization of class template selected

2024-01-09 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113272 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c++/113272] Wrong specialization of class template selected

2024-01-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113272 Andrew Pinski changed: What|Removed |Added CC||janschultke at googlemail dot com ---