This allows the implicitly-generated deduction guide for the copy constructor to be recognised as an initializer-list constructor, allowing CTAD for std::initializer_list
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
280 ms | x64 debian > Flang.Lower/Intrinsics::ieee_copy_sign.f90 |
Event Timeline
The implicitly-generated guide for template<class E> struct initializer_list;'s copy constructor's first argument is an injected-class-name. When it was not recognised as an initializer_list, it was erroneously excluded when the initializer was a braced-init-list.
Also falls foul of -Wctad-maybe-unsupported. Looks like this is being worked on in https://reviews.llvm.org/D133425 but should std::initializer_list{ a, b, c } be a built-in exception to this diagnostic? If not, I would recommend using _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(initializer_list) in libc++ from https://reviews.llvm.org/D133535. For comparison, GCC does not warn with -Wctad-maybe-unsupported.
This makes sense I see that isStdInitializerList(...) is used in a lot of places, this makes me wonder if we need additional test coverage.
I also added some folks for more review visibility.
clang/docs/ReleaseNotes.rst | ||
---|---|---|
111 |