[Bug c++/116739] New: template parameter confusion results in parameter packs not expanded with '...'

2024-09-16 Thread ted at lyncon dot se via Gcc-bugs
NCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ted at lyncon dot se Target Milestone: --- The following results in `error: parameter packs not expanded with '...'` in all versions of g

[Bug c++/116714] [14/15 Regression] Inconsistent lambda type inference in function template instance

2024-09-14 Thread ted at lyncon dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116714 --- Comment #6 from Ted Lyngmo --- Darn... :-) Glad you're on it!

[Bug c++/116714] [14/15 Regression] Inconsistent lambda type inference in function template instance

2024-09-14 Thread ted at lyncon dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116714 --- Comment #4 from Ted Lyngmo --- Andrew: The reduced example you provided is not interpreted the same way as what I used when I wrote the report. I think they fail for different reasons. Possibly at different stages. I went through the languag

[Bug c++/116714] New: [14 Regression] Inconsistent lambda type inference in function template instance

2024-09-14 Thread ted at lyncon dot se via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ted at lyncon dot se Target Milestone: --- The lambda type `type` is here used to instantiate two objects, i1 and i2. They are clearly of the same type since `std

[Bug tree-optimization/107087] [12 Regression] bits/stl_algobase.h:431: warning: 'void* __builtin_memcpy(void*, const void*, unsigned int)' reading between 8 and 2147483644 bytes from a region of siz

2024-08-07 Thread ted at lyncon dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107087 Ted Lyngmo changed: What|Removed |Added CC||ted at lyncon dot se --- Comment #20 from

[Bug c++/116051] inconsistent handling of void typedefs in otherwise empty parameter lists

2024-07-23 Thread ted at lyncon dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116051 --- Comment #1 from Ted Lyngmo --- I realized that T in the working usages is non-dependent. I think we can close this right away.

[Bug c++/116051] New: inconsistent handling of void typedefs in otherwise empty parameter lists

2024-07-23 Thread ted at lyncon dot se via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ted at lyncon dot se Target Milestone: --- I believe this is related to https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#577 ``` #include template struct Foo

[Bug c++/114625] requires { T{}; } wrongly returns false when T{} is ill-formed while in concept

2024-04-15 Thread ted at lyncon dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114625 --- Comment #5 from Ted Lyngmo --- @Andrew, the title change seems wrong. It wrongly returns true when T{} is ill-formed.

[Bug c++/114625] requires { T{}; } wrongly accepted when T{} is ill-formed while in concept

2024-04-07 Thread ted at lyncon dot se via Gcc-bugs
|accepted when T{} is|accepted when T{} is |ill-formed |ill-formed while in concept CC||ted at lyncon dot se --- Comment #1 from Ted Lyngmo --- The assertion correctly fails with this though

[Bug c++/114625] New: requires { T{}; } wrongly accepted when T{} is ill-formed

2024-04-07 Thread ted at lyncon dot se via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ted at lyncon dot se Target Milestone: --- This program compiles but I'd expect both `static_assert`s to refuse it since `d x{};` is invalid. ``` #include template co

[Bug c++/114504] New: Non-structural type accepted as non-type template parameter type

2024-03-27 Thread ted at lyncon dot se via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ted at lyncon dot se Target Milestone: --- gcc accepts `NonStructuralType` as a non-type template parameter type below: ``` struct StructuralType1 { constexpr StructuralType1(int A

[Bug c++/112349] New: ranges::max makes unecessary copies

2023-11-02 Thread ted at lyncon dot se via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: ted at lyncon dot se Target Milestone: --- From: https://stackoverflow.com/questions/77409266/why-does-gcc-copy-object-for-each-comparison-in-stdrangesmax OP's sample program shows a copy being made for each compa

[Bug c++/93595] [c++20] function call, substitution failure of template paramter with a lambda default in template context

2023-07-11 Thread ted at lyncon dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93595 --- Comment #8 from Ted Lyngmo --- :-) Ok I tried understanding the Status by reading https://gcc.gnu.org/bugzilla/page.cgi?id=fields.html#bug_status but it doesn't mention NEW. But ok, as long as it's actually a confirmed bug, I'm good.

[Bug c++/93595] [c++20] function call, substitution failure of template paramter with a lambda default in template context

2023-07-11 Thread ted at lyncon dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93595 --- Comment #6 from Ted Lyngmo --- @Andrew Pinski: Shouldn't the status be "CONFIRMED" rather than "NEW"?

[Bug c++/110604] New: template argument deduction failed with decltype(lambda)

2023-07-09 Thread ted at lyncon dot se via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ted at lyncon dot se Target Milestone: --- Compiling this in C++20 mode on trunk (https://godbolt.org/z/dW5cf3WrK): ``` template struct foo { template void bar() {} }; int main

[Bug c++/108303] New: lookup failes with requires clause on non-template friend function of a class template

2023-01-05 Thread ted at lyncon dot se via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ted at lyncon dot se Target Milestone: --- This works up to 12.2 (inclusive) on godbolt but fails on trunk: ``` template struct base { friend void foo(const

[Bug c++/106110] Expected ambiguity but it resolves fine

2022-06-27 Thread ted at lyncon dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106110 --- Comment #1 from Ted Lyngmo --- Sorry, the helper variable template should be: ``` template static constexpr bool is_foo_call_ambiguous_v = is_foo_call_ambiguous::value; ``` It gives the same result: https://godbolt.org/z/bKbn8Gre7

[Bug c++/106110] New: Expected ambiguity but it resolves fine

2022-06-27 Thread ted at lyncon dot se via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: ted at lyncon dot se Target Milestone: --- I made a type trait to test if a call to a function using certain arguments would be ambiguous or not, but in the below example, where I expected that calling the function `foo` with a

[Bug c++/105637] [12 Regression] Wrong overload selected in base class

2022-06-03 Thread ted at lyncon dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105637 --- Comment #5 from Ted Lyngmo --- Excellent and thanks!

[Bug c++/105637] New: [11 Regression] Wrong overload selected in base class

2022-05-17 Thread ted at lyncon dot se via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ted at lyncon dot se Target Milestone: --- This compiles fine in 11.3 but selects the non-const `BaseClass` overload in 12.1: ``` struct BaseClass { // Commenting out this non-const function out will fix the

[Bug c++/104565] New: One too many `this`es in parsing?

2022-02-16 Thread ted at lyncon dot se via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: ted at lyncon dot se Target Milestone: --- Regression between g++ 9.4 and 10.1: ``` struct apa { constexpr auto n() const { return 3; } }; template constexpr auto f() { apa foo; int{foo.n()}; // no matching function for

[Bug c++/86581] constexpr variable allows uninitialized member of anonymous struct inside union

2019-08-14 Thread ted at lyncon dot se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86581 Ted Lyngmo changed: What|Removed |Added CC||ted at lyncon dot se --- Comment #2 from

[Bug c++/81486] Class template argument deduction fails with (), succeeds with {}

2018-11-02 Thread ted at lyncon dot se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81486 Ted Lyngmo changed: What|Removed |Added CC||ted at lyncon dot se --- Comment #3 from