clang-concepts-monorepo
clang-concepts-monorepo copied to clipboard
****** OBSOLETE - CONCEPTS HAS BEEN MERGED INTO CLANG TRUNK AND DEVELOPMENT CONTINUES THERE ****** This fork of llvm-project contains my implementation of C++2a Concepts for the Clang compiler, and wi...
``` template struct is_same { static constexpr bool Value = false; }; template struct is_same { static constexpr bool Value = true; }; template concept IsInt = is_same::Value; template concept...
this code generates `error : cannot yet mangle expression type ImplicitCastExpr` ~~~ template< bool _ = []( int n, int m ) constexpr { return n < m; }( 1,...
I'm not sure whether this is intended or not, so I'm just putting it out here. https://godbolt.org/z/Xbx832 ```C++ template struct X_base { X_base(int) requires B { } }; struct X...
``` template int c = 1; template concept c_wrapper = c; static_assert(c_wrapper); static_assert(c_wrapper); static_assert(c_wrapper); static_assert(c_wrapper); ``` This fails to diagnose the unexpanded parameter pack `Ts` in `c_wrapper`. Instead, it seems...
Maybe my understanding of concepts is not good enough, but I'm having this issue. https://godbolt.org/z/ThKZu5 As seen in the example parameter declared as Employee auto && is deduced as Employee...
Foo.h: ``` template concept ReturnTy = true; template concept MyConcept = requires (T t) { { t.foo } -> ReturnTy; { t.bar } -> int; }; ``` Foo.cpp: ``` #include...
This well-formed TU: ```c++ template concept C = true; template struct S { template S(U) {} }; template S(T&) -> S; ``` [ICEs the compiler](https://godbolt.org/z/GItoyo) with diagnostics (from my local...
Assertion failure with member access of result of function declared with decltype(expr) return type
The following code: ``` struct s { int x; }; decltype(s()) f(); auto x = (f()).x; ``` Gives the following assertion failure: ``` clang-10: /home/david/llvm-concepts/clang/lib/Sema/SemaExprMember.cpp:510: clang::ExprResult clang::Sema::ActOnDependentMemberExpr(clang::Expr *, clang::QualType, bool,...
crash
https://godbolt.org/z/YTHrPH
In this well-formed TU (https://godbolt.org/z/EzMFaM): ```c++ template concept same_as = __is_same(T, U); template concept C = requires { { T::value } -> same_as; }; struct S { static constexpr int...