/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/python/cpp20_alias_template_runme.py
16 строк
547 B
William S Fulton
C++20 constrained alias templates: parse and support
27 май 2026, 22:35
27 май 2026, 22:35
5f62959
Код
Авторство
О чём код?
from cpp20_alias_template import * from swig_test_utils import swig_check # All four aliases - unconstrained, type-constraint in parm list, # requires-clause and unseen-concept best effort - resolve to Box<int> in the # type system and are wrapped as the single BoxInt class. for factory, tag in [(make_plain, "plain"), (make_num, "num"), (make_req, "req"), (make_unseen, "unseen")]: b = factory(10) swig_check(b.get(), 10) b.set(42) swig_check(b.get(), 42)