[Lldb-commits] [PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.
Andrey Ali Khan Bolshakov via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Aug 6 16:00:14 PDT 2023
bolshakov-a added inline comments.
================
Comment at: clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp:56
+using CF = ComplexFloat<1.0f + 3.0fi>;
+using CF = ComplexFloat<3.0fi + 1.0f>;
----------------
bolshakov-a wrote:
> aaron.ballman wrote:
> > bolshakov-a wrote:
> > > shafik wrote:
> > > > Can we add an enum example e.g.:
> > > >
> > > > ```
> > > > enum E{ E1, E2};
> > > > template <E> struct SE {};
> > > > using IPE = SE<E1>;
> > > > using IPE = SE<E2>;
> > > >
> > > > ```
> > > What for? Enumerators as non-type template arguments are allowed since C++98, AFAIK. And this test is about changes in C++20.
> > Sometimes we're lacking coverage for existing features, so when updating code in the area, we'll sometimes ask for extra coverage just to be sure we're not regressing something we think might not have a lot of existing test coverage.
> `temp_arg_nontype.cpp` test already has some `enum` cases. If a case with type alias should be added, it shoud be added there, not in the `temp_arg_nontype_cxx20.cpp`, I think.
I've just realized that C++98 didn't had type aliases. But `typedef`s should probably go as well.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140996/new/
https://reviews.llvm.org/D140996
More information about the lldb-commits
mailing list