[PATCH] D41284: [Concepts] Associated constraints infrastructure.
Arthur O'Dwyer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 17 15:49:30 PDT 2018
Quuxplusone added inline comments.
================
Comment at: test/CXX/concepts-ts/temp/temp.constr/temp.constr.decl/var-template-decl.cpp:10
+
+template <typename U> requires bool(U())
+int B::A = int(U());
----------------
For my own edification, could you explain whether, given
#define BOOL bool
using typedef_for_bool = bool;
you'd expect to diagnose a redeclaration of `B::A` with associated constraint
requires bool( U() ) // extra whitespace
or
requires BOOL(U()) // different spelling of `bool`
or
requires typedef_for_bool(U()) // different spelling of `bool`
? My naive reading of N4762 temp.constr.atomic/2 says that none of these constraints (on line 10) would be "identical" to the constraint on line 6... but then I don't understand what's the salient difference between line 10 (which apparently gives no error) and line 22 (which apparently gives an error).
Repository:
rC Clang
https://reviews.llvm.org/D41284
More information about the cfe-commits
mailing list