[PATCH] D38216: [C++17] Fix class template argument deduction for default constructors without an initializer
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 21 17:01:03 PDT 2018
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
================
Comment at: test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.class.deduct/p1.cpp:17
};
extern A x; // expected-error {{requires an initializer}}
+static A y;
----------------
The diagnostic we produce in this case is not very good. The problem is not that the declaration requires an initializer (how can a forward declaration like this require an initializer?), instead the problem is that type deduction is only possible for the initializing declaration of a variable.
https://reviews.llvm.org/D38216
More information about the cfe-commits
mailing list