|
|
От: | sdpark | |
| Дата: | 12.02.22 20:35 | ||
| Оценка: | -1 | ||
R>Variant: Fix so it works with C++20
R>C++20 changed some aspects of templates that broke variant.h on
R>some compilers (GCC 11).
R>Ref: https://wg21.cmeerw.net/cwg/issue2237
R> template<class T>
R> struct A {
R> A<T>(); // ok pre-C++20, now incorrect
R>// A(); // correct for all versions
R> };
R>This commit removes the "simple-template-id" from both the default
R>constructor (no args) and the explicit constructor (has args), even
R>though only the default constructor currently gives error on GCC 11.
R>Since both versions are wrong according to the issue referred to above
R>it is expected that GCC (and possibly other compilers) will be updated
R>to fail on both cases in the future.