Re[3]: Не знакомый синтаксис специализации шаблона
От: reversecode google
Дата: 12.02.22 20:11
Оценка:
а тык вы еще и троль, ну ну
вам первой ссылкой ответили

https://gitlab.gnome.org/GNOME/glibmm/-/commit/75bb943092d4584b8061376a16079a51f72d2f0a

Variant: Fix so it works with C++20
C++20 changed some aspects of templates that broke variant.h on
some compilers (GCC 11).

Ref: https://wg21.cmeerw.net/cwg/issue2237

template<class T>
struct A {
A<T>(); // ok pre-C++20, now incorrect
// A(); // correct for all versions
};

This commit removes the "simple-template-id" from both the default
constructor (no args) and the explicit constructor (has args), even
though only the default constructor currently gives error on GCC 11.
Since both versions are wrong according to the issue referred to above
it is expected that GCC (and possibly other compilers) will be updated
to fail on both cases in the future.

 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.