/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/lua/cpp11_inheriting_constructors_runme.lua
16 строк
808 B
William S Fulton
Inherit constructors named through a typedef base
17 июн 2026, 03:47
17 июн 2026, 03:47
b78dba1
Код
Авторство
О чём код?
local v=require("cpp11_inheriting_constructors") -- Constructor inheritance via using declaration local d = v.DerivedClass(10) assert(d:retrieveValue() == 10, "retrieveValue()") -- A protected member brought into the public interface through a typedef naming a base that has inheriting constructors assert(v.UseInheritCtorTypedef(42):protectedValue() == 42, "UseInheritCtorTypedef.protectedValue()") -- A protected base method brought into the public interface through a typedef naming a template-mixin -- base whose constructors are inherited through the template parameter (issue #2951) assert(v.UseTemplateInheritCtor(42):protectedValue() == 42, "UseTemplateInheritCtor.protectedValue()") -- Member initialization at the site of the declaration local s = v.SomeClass() assert(s.value == 5, "s.value")