MagentaTreehouse
MagentaTreehouse
Originally reported for MSVC [here](https://developercommunity.visualstudio.com/t/10584684). ```c++ template concept Constraint = true; template struct Struct { Struct(Constraint auto) { } }; template using Test = Struct; int main() { Test{ 0...
The following C++20 code causes a crash: ```c++ template struct A { F funcObj; }; template auto f() { A{}.funcObj(); } int main() { f(); } ``` See https://compiler-explorer.com/z/qbfWh9YKd. Error:...
The following C++20 code causes a crash: ```c++ template struct A { F funcObj; }; template struct B { static constexpr auto f{A{}.funcObj}; }; int main() { B::f; } ```...
```c++ template using T = int; ``` This is rejected by GCC, MSVC and EDG. See https://compiler-explorer.com/z/6a5jWGn4s.
The following C++20 code causes a crash since Clang 18: ```c++ template constexpr auto f() { return [] () requires requires (T x) { x; } {}; } int main()...
The following should be valid C++20 code: ```c++ template using F = decltype([] (auto a) requires (sizeof(T) > sizeof a) {}); int main() { F f; f(char{}); } ``` Clang...
In the following code, the init-capture of the lambda has the same name as the NTTP `i`, which should not be allowed. ```c++ template int f() { return [i =...
[Clang] Crash when lambda requires clause uses a parameter declared in an outer requires expression
The following C++20 code causes a crash since Clang 18: ```c++ template constexpr bool B = requires (T x) { [] () requires requires { x; } {}(); }; static_assert(B);...
```c++ template struct A { template A(ArgTs...) {} }; template A(ArgTs...) -> A; template using AA = A; AA a{}; ``` See https://compiler-explorer.com/z/3c8bYM5To. Unreachable: ```console Can't get a NULL template...
The following C++17 code is accepted by GCC and MSVC, but rejected by Clang. ```c++ template struct A { A(T) {} }; template A a{0}; template A a; ``` Output:...