[PATCH] D41217: [Concepts] Concept Specialization Expressions

Saar Raz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 11 12:29:20 PDT 2018


saar.raz added inline comments.


================
Comment at: test/CXX/concepts-ts/expr/expr.prim/expr.prim.id/p3.cpp:121
+template<typename T>
+concept C7 = sizeof(T) == 1 || sizeof(typename T3<T>::type) == 1; // expected-note{{while substituting template arguments into constraint expression here}} expected-note{{in instantiation of template class 'T3<short>' requested here}}
+
----------------
Quuxplusone wrote:
> Nit: You could use `// expected-note at -1{{...}}`, `// expected-note at -2{{...}}` to make lines like this more readable.
😮😳 Well you learn something every day 


================
Comment at: test/Parser/cxx-concept-declaration.cpp:48
+bool a = C16<true>;
+bool b = C17<true>;
----------------
Quuxplusone wrote:
> Should you static-assert the expected results?
> ```
> static_assert(!C12<bool>);
> static_assert(C13<int>);
> static_assert(C14<int>);
> static_assert(C15<int>);
> static_assert(C16<true>);
> static_assert(C16<false>);
> static_assert(C17<true>);
> static_assert(!C17<false>);
> ```
That's not the point of these tests but it couldn't hurt, I guess 


Repository:
  rC Clang

https://reviews.llvm.org/D41217





More information about the cfe-commits mailing list