-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement CWG2685: Aggregate CTAD, string, and brace elision #95383
Comments
@llvm/issue-subscribers-clang-frontend Author: Haojian Wu (hokein)
see https://cplusplus.github.io/CWG/issues/2685.html
|
I think that has already been implemented? See the test in 3475116 |
I didn't see any related implementation for the rule Yeah, clang accepts the testcase, but the result seems incorrect: template <class T>
struct A {
T ar[4];
};
A a = {"foo"}; Here, the template argument Clang also accepts the following case, I think it should be rejected as brace elision is not considered for string literals: template <class T>
struct A {
T ar[4];
};
A a = {"a", "b", "c", "d"}; |
It's interesting to note that all compilers accept the case https://godbolt.org/z/WhPo939f7 (MSVC is seemingly unavailable at the moment) Edit: #95389 |
(Assigned it to myself in the hope that I would be able to look into it in the next few days.) |
see https://cplusplus.github.io/CWG/issues/2685.html
The text was updated successfully, but these errors were encountered: