Re[4]: Не знакомый синтаксис специализации шаблона
От: sdpark  
Дата: 12.02.22 20:35
Оценка: -1
Здравствуйте, reversecode, Вы писали:

R>а тык вы еще и троль, ну ну

R>вам первой ссылкой ответили

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

R>

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.


За ссылку человеку спасибо, но о таком решении я и сам догадался. Вопрос был не об этом, а о синтаксисе.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.