Этот код не компилируется с GCC14 с -std = c ++ 20 .
#include
#include
struct Foo
{
template
Foo(T) {}
};
struct Bar
{
Bar(std::tuple) {}
};
int main()
{
return std::is_constructible_v;
}
< /code>
Ошибки включают < /p>
tuple:979:42: error: satisfaction of atomic constraint '__constructible() [with _Elements = {_Elements ...}; _UTypes = {_UTypes ...}]' depends on itself
tuple:989:42: error: 'static consteval bool std::tuple< >::__constructible() [with _UTypes = {Bar}; _Elements = {Foo}]' called in a constant expression before its definition is complete
tuple:989:42: error: satisfaction value of atomic constraint '__constructible() [with _Elements = {Foo}; _UTypes = {Bar}]' changed from '' to 'true'
Полный вывод можно увидеть здесь: https://godbolt.org/z/qfc3p7rqf
образное. Размещение явного в bar конструктор также решает проблему. PrettyPrint-Override ">Bar b1{Foo{0}};
Bar b2{b1};
Подробнее здесь: https://stackoverflow.com/questions/795 ... -on-itself
Удовлетворение атомного ограничения '__ -конструктивного ... »зависит от себя ⇐ C++
Программы на C++. Форум разработчиков
1741688991
Anonymous
Этот код не компилируется с GCC14 с -std = c ++ 20 .
#include
#include
struct Foo
{
template
Foo(T) {}
};
struct Bar
{
Bar(std::tuple) {}
};
int main()
{
return std::is_constructible_v;
}
< /code>
Ошибки включают < /p>
tuple:979:42: error: satisfaction of atomic constraint '__constructible() [with _Elements = {_Elements ...}; _UTypes = {_UTypes ...}]' depends on itself
tuple:989:42: error: 'static consteval bool std::tuple< >::__constructible() [with _UTypes = {Bar}; _Elements = {Foo}]' called in a constant expression before its definition is complete
tuple:989:42: error: satisfaction value of atomic constraint '__constructible() [with _Elements = {Foo}; _UTypes = {Bar}]' changed from '' to 'true'
Полный вывод можно увидеть здесь: https://godbolt.org/z/qfc3p7rqf
образное. Размещение явного в bar конструктор также решает проблему. PrettyPrint-Override ">Bar b1{Foo{0}};
Bar b2{b1};
Подробнее здесь: [url]https://stackoverflow.com/questions/79500418/satisfaction-of-atomic-constraint-constructible-depends-on-itself[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия