: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
Using built-in specs.
COLLECT_GCC=/usr/local/bin/gcc-10
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/10.1.0/libexec/gcc/x86_64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96408
--- Comment #1 from 康桓瑋 ---
Created attachment 48976
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48976&action=edit
the preprocessed file
gcc -v -save-temps -std=c++20 main.cpp
: gcc
Version: 10.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
Created attachment 48977
--> ht
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96409
--- Comment #1 from 康桓瑋 ---
Created attachment 48978
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48978&action=edit
the source file
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96408
--- Comment #2 from 康桓瑋 ---
Created attachment 48979
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48979&action=edit
the source file
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
Created attachment 48980
--> https://gcc.gnu.org/bugzilla/attachment.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96410
--- Comment #1 from 康桓瑋 ---
Equivalent example:
https://godbolt.org/z/chYW3c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96408
--- Comment #3 from 康桓瑋 ---
Live example:
https://godbolt.org/z/vMT5Md
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96409
--- Comment #2 from 康桓瑋 ---
Equivalent example:
https://godbolt.org/z/n47Gfh
verity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
#include
#include
using variant = std::variant;
constexpr auto operator<=>(const variant& v, const auto&am
verity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
#include
constexpr auto operator<=>(const auto& v, const auto& u) {
return std::visit([&u](const a
sion: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
(https://godbolt.org/z/W8zx58)
#include
#include
constexpr auto f
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
#include
auto operator|(auto S, auto) {
return S;
}
int main()
{
decltype(std::index_sequence<0>{} | 0 | 0);
}
gives:
: In function 'int main()':
:9:43: interna
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96575
--- Comment #1 from 康桓瑋 ---
I don't know whether this is same issue or not:
#include
constexpr auto replace = [](auto old_x, auto new_x) {
return [=](auto r) {
return std::ranges::replace(r, old_x, new_x);
};
};
// this one is ok
con
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
The following code:
auto f() {
const auto x = 1;
return [] (auto) { return x; };
}
will emit unused variable warnings with &
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
The following code accepts by GCC-trunk:
auto x = [x]{ };
godbolt: https://godbolt.org/z/e76Kn1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99379
--- Comment #1 from 康桓瑋 ---
I find this:
https://stackoverflow.com/questions/25693676/auto-variable-used-in-lambda-in-its-own-initializer
So this is not a bug.
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
The following code will trigger the segmentation fault of gcc-trunk:
template
auto g() requires ([] { return 0; } ());
int main() { g
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99465
--- Comment #1 from 康桓瑋 ---
Other related ICE:
template requires ([]{}());
auto f() requires ([]{}());
https://godbolt.org/z/8z3PPx
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99465
--- Comment #2 from 康桓瑋 ---
Here is the minimal reduced example:
f() requires [
godbolt: https://godbolt.org/z/eMWxPj
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
The following code will trigger ICE on gcc-9.1 ~ gcc-trunk with "-std=c++2a"
mode:
template auto f() {}
int main() { f<{}>(); }
(godbolt: https://godbolt.org/z/dEP5PT)
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
This may be related/duplicated to the 99478, but I am not sure.
The following code will trigger ICE only on gcc-9:
int main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99505
--- Comment #2 from 康桓瑋 ---
Yep, wandbox (https://wandbox.org/permlink/OUJpCz6dFrlA1vod) compiles fine.
This invalid code maybe can reproduce that locally.
int main() {
[] (decltype([]{})) {} ();
}
(wandbox: https://wandbox.org/permlink/re9
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
The following code should not be accepted by gcc-10, since default arguments
are not allowed for parameters of a requires expression
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
This may be related/duplicated to the 99505, but I am not sure.
The following invalid code will trigger Segmentation fault on gcc-10
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
GCC 9, 10, 11 rejects the following code:
template
struct S {};
S<> s;
(godbolt: https://godbolt.org/z/Gs4776)
-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
This may be related/duplicated to the 99513, but I am not sure.
The following invalid code will
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99521
康桓瑋 changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99465
--- Comment #3 from 康桓瑋 ---
*** Bug 99521 has been marked as a duplicate of this bug. ***
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99361
康桓瑋 changed:
What|Removed |Added
Resolution|--- |DUPLICATE
Status|NEW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96311
康桓瑋 changed:
What|Removed |Added
CC||hewillk at gmail dot com
--- Comment #5 from 康桓瑋
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
The following code will trigger the ICE of gcc-10 and trunk:
int main(){
[] { return requires { []{}; }; };
}
(godbolt: https://godbolt.org/z/WGjx9h)
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
gcc-trunk accepts the following code:
template
concept C = requires(T t, ...) {// error: terminates with an ellipsis
t;
};
(goldbot: https://godbolt.org/z/qbz7b9)
but
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
gcc-trunk accepts following code:
int main() {
constexpr auto b = requires { []{}; };
static_assert(b);
static_assert(!b);
}
(godbolt: https://godbolt.org/z/4K5vq8)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99546
--- Comment #1 from 康桓瑋 ---
You can see more weird cases in this:
https://stackoverflow.com/questions/66578966/weird-return-value-of-c20-requires-expression.
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
The following valid code failed since gcc-4.7
void f(...);
template
void g() {
f([]() noexcept(B) {} ...);
}
(goldbot: https
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
This may be related/duplicated to PR 99513 or PR 99583, but I am not sure.
The following invalid code triggers
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
gcc-9 should reject this code:
void f(auto... args) {
([...args]{}, ...);
}
according to [expr.prim.lambda#nt:init-capture], the "...args" in capture list
must
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
The following code will trigger ICE on gcc-8 ~ gcc-trunk with "-std=c++2a"
mode:
void g(auto... args) {
([args...](auto){}(args), ...);
}
int main() { g(0, 1); }
(gold
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99590
--- Comment #1 from 康桓瑋 ---
I think this is a valid code:
void g(auto... args) {
([args...](auto...){}(args ), ...);
}
void f(auto... args) {
([args ](auto...){}(args...), ...);
}
int main() {
g(0, 1); // this one ICE
f(0, 1); //
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
Same form with PR 99583, this code should work:
template
auto f() {
([](auto) requires (B) {}, ...);
}
(goldbot: https://godbolt.org/z/jdn4je)
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
The following code will trigger ICE on gcc-trunk:
auto f(auto... args) {
([]{ y; }, ...);
}
int main() { f(0); }
(godbolt: https://godbolt.org/z/11G8G5)
(wanbox: https
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
The following code intends to work, even if it fails in three major compilers:
template
void f(Ts...) {
([](){}, ...);
}
int main() { f(0, 0.5); }
(goldbot: https
normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
gcc-trunk rejects this valid code:
struct S{
operator int() { return 0; }
};
auto operator<=>(S, S) { return S{};
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99589
--- Comment #1 from 康桓瑋 ---
reduced:
auto f(auto x) {
[...x]{};
}
it_template_parm, at
cp/parser.c:45415
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot co
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/8T3MGv
#include
#include
auto g(auto...) {
std::cout << std::source_lo
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/reG8qE
void bar(auto) requires undeclared_identifier;
GCC accepts this code.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99546
--- Comment #4 from 康桓瑋 ---
same form, but this will trigger ICE:
struct S{
constexpr static auto s = requires { []; };
};
:1:8: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in overri
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99672
--- Comment #3 from 康桓瑋 ---
I think the issue of line() function also needs to do a patch.
https://godbolt.org/z/q8EPnG
constexpr int g(auto...) {
return std::source_location::current( // < opening paren line number
).line();
}
constexpr
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/93qM1b
struct A {
constexpr A() { c[0] = 0; }
char c[2];
};
constexpr A a;
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
auto f(auto&&...) {}
auto f(auto...) requires true {}
int main() {
f();
}
gcc reject with:
:5:5: error: call of overl
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
struct S {
constexpr auto f(auto...) &&{ retu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99730
--- Comment #3 from 康桓瑋 ---
Really appreciate your reply and explanation.
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
template
concept C = (requires { requires B; } && ...);
static_assert(C);
gcc rejects this code.
https://godbolt.org/z/c6sEq5KEs
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
static_assert(requires { [x = 0]{}; });
https://godbolt.org/z/n9KE4z7P6
I don't know whether this code is well-form or not.
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/dz1bcxhYf
template
struct S {
int a : sizeof(Ts);
};
S s;
:3:11: internal compiler error: in dependent_type_p, at cp/pt.c:26775
3 | int a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99745
--- Comment #1 from 康桓瑋 ---
Reduce a little:
template
struct S {
int x : Xs;
};
S s;
:3:7: internal compiler error: unexpected expression 'Xs' of kind
template_parm_index
3 | int x : Xs;
| ^
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
constexpr auto operator""_s(const char*, unsigned long size = 2) {
return size;
}
static_assert(operator""_s(nu
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
In ranges::find_end implementation:
674 else
675 {
676 auto __i = ranges::next(__first1, __last1);
677
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99752
--- Comment #1 from 康桓瑋 ---
My pardon, since the ranges::find_end return type is ranges::subrange, we
still to get the common last1 iterator through the ranges::next call, so this
seems not a bug.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99752
康桓瑋 changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
related to PR 99745:
template
struct S {
constexpr static auto x = Ts::x;
};
S s;
:3:25: internal compiler error: in cp_finish_decl, at cp
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/b6cnKo7ej
template struct A {};
template struct B {};
template using b = B<[]{ return a; }()>;
:3:45: in
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/4Yfnfzdhe
struct A { A(auto); };
A(unsigned) -> A:: template A;
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/s687ePeGG
template concept C = requires (T a) { a.f(0); };
struct S { void f(auto) noexcept(); };
static_assert(C
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/4dnnTTzMW
#include
auto f(auto... args) {
return [](std::same_as auto) {};
}
int main() {
f(0)(0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/shj7Tr65M
related to PR 99809:
#include
template
auto f(Ts...)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99811
--- Comment #1 from 康桓瑋 ---
same form with the different error message:
https://godbolt.org/z/hE9n6eEMT
#include
template
auto f(Ts...) {
return [] auto> {};
}
int main() {
f(0).template operator()<0>();
}
:9:30: internal compiler err
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99800
康桓瑋 changed:
What|Removed |Added
Keywords|ice-on-invalid-code |ice-on-valid-code
--- Comment #1 from 康桓瑋 ---
Thi
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/4vx18beMW
template concept C = true;
template
auto bar(Ts...) { C auto x = 0; }
:4:37: internal compiler error
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99809
--- Comment #2 from 康桓瑋 ---
I think this is not a valid code even if clang accepts it, since the parameter
packs args are not expanded.
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
This is a complicated one since I don't know how to reduce it.
https://godbolt.org/z/rqTGxMWef
#include
template
struct StringLiteral {
constexpr StringLiteral(const char
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831
--- Comment #1 from 康桓瑋 ---
Note that if we comment one of the asserts, there will be no problem, or we
just comment the redundant std::ranges::sort.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831
--- Comment #4 from 康桓瑋 ---
When the array subscript is outside the bounds of array, gcc seems to fall into
infinite recursion due to the default operator==.
Here is the reduced with no header:
struct A {
constexpr A(const char*) {}
char va
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
Related to fixed PR 99745 and PR 99757.
https://godbolt.org/z/5qW5a1Mnq
template
struct S {
constexpr explicit(B) S() {}
};
con
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99809
--- Comment #3 from 康桓瑋 ---
More reduced:
template
concept C = true;
void f(auto... args) {
[](C auto) {};
}
int main() { f(); }
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/hxed4eorx
template
concept C = false;
template
auto f(Ts...) {
([](C auto){}, ...);
}
gcc rejects it.
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/x5E5cGPTb
auto l = [] requires true -> void {};
gcc incorrectly rejects this valid lambda, you can see more details in
https://stackoverflow.com/questi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99850
--- Comment #4 from 康桓瑋 ---
This ICE may be caused by not handle this form.
template concept C = true;
auto l = [] requires (C && ...) -> void {};
https://godbolt.org/z/vo8xPd4hY
:3:48: internal compiler error: Segmentation fault
3 | aut
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
This is a small variant of fixed PR 99815.
https://godbolt.org/z/jezs4qh3E
template concept C = true;
template
auto bar(Ts...) { for (C auto c : ""); }
:4:42
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/4fxhP6jf9
template
auto l = [] requires requires { x; } {};
int main() {
l<0>.template operat
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/fjx8cG995
template struct A {};
template struct S { void foo(S<+a>); };
:2:40: internal compiler
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
This is a small variant of fixed PR 99815, PR 99869.
https://godbolt.org/z/zrnPqdenx
template concept C = true;
struct S { int a, b; };
template
auto bar(Ts...) { C auto [a, b
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
maybe dup of PR 99595.
https://godbolt.org/z/zarsP11Y6
template concept C = true;
template struct A {};
template class>
struct S {};
constexpr S s;
:5:14: inter
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/jWr39rrsT
#include
template
struct S {};
template class>
constexpr auto f() {}
int
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/cW8367TTr
struct S {} s;
template concept C = requires { [a] = s; };
static_assert(C);
:2:41
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/zPPMEaa33
template concept C = true;
void foo() { if (C<>) return; }
gcc rejects this valid grammar with:
: In fu
NCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
Maybe dup of PR 79009.
https://godbolt.org/z/sGacxEj31
template concept C = true;
C auto i = 0, j = 0.5, k = "";
: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
I found that include will automatically include the entire
in C++17 mode, and both the and will be automatically
included in C++20 mode:
https
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/cdqq3ocTG
template concept C = true;
template void f() { C auto x = 0; };
int main() { f(); }
gcc accepts it.
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/qs44TqzKe
template
void f() requires requires { x == "hello world"; } {};
int main() { f
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99970
--- Comment #1 from 康桓瑋 ---
The requires-expression is a red herring, so it can be simplified to:
template
void f() { x == nullptr; };
int main() {
f();
}
Is this ill-formed?
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/ax7MKM483
template concept C = requires (Ts) { true; };
static_assert(C);
gcc accepts it.
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
Congratulations on hitting the 10,000 reports mark!
https://godbolt.org/z/dhPqd4595
template
auto f(Ts...) {
[] { enum class e : Ts {}; };
}
int main() {
f(0, true);
}
:3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16
--- Comment #1 from 康桓瑋 ---
(In reply to 康桓瑋 from comment #0)
> Congratulations on hitting the 10,000 reports mark!
>
> https://godbolt.org/z/dhPqd4595
>
> template
> auto f(Ts...) {
> [] { enum class e : Ts {}; };
> }
>
> int main() {
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16
--- Comment #3 from 康桓瑋 ---
https://godbolt.org/z/o6h8GP6ae
Maybe same form:
template
auto f() {
[] { struct S : Ts {}; };
}
int main() {
f<>();
}
:3:15: internal compiler error: in dependent_type_p, at cp/pt.c:26745
3 | [] { stru
++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/ccb69heP9
template
auto f() {
([] { struct U { int x : Ns; }; }, ...);
([] { union U { int x : Ns; }; }, ...);
}
gcc rejects it.
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/WajPza5fM
void f(auto... args) {
[] {
try {} catch (decltype(args)) {}
};
}
int main() {
f(0);
}
:3:19: internal compiler error
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/49KvrsM9W
template
void g() {
([] { struct alignas(Ns) S {}; }, ...);
}
gcc rejects it.
1 - 100 of 540 matches
Mail list logo