Merge branch 'templates-scope-enforcement'
* templates-scope-enforcement: Test a few %template errors Add using declarations to templates into typedef table. Fix type lookup in the presence of using directives and using declarations More docs on %template Testcase fix for nameclash in php %template scope enforcement and class definition fixes Template documentation tweaks More consistent formatting of examples in documentation More consistent formatting of examples in documentation Documentation corrections to use targetlang formatting More consistent formatting of examples in documentation More consistent formatting of examples in documentation More consistent formatting of examples in documentation Namespace documentation minor corrections Improve description of template_parameters_resolve Minor code optimisation in template_parameters_resolve Fix scope lookup for template parameters containing unary scope operators Typemap change for templates
This commit is contained in:
commit
32a454cfef
51 changed files with 1924 additions and 700 deletions
|
|
@ -0,0 +1,15 @@
|
|||
import template_using_directive_typedef
|
||||
|
||||
vo = template_using_directive_typedef.Vector_Obj();
|
||||
|
||||
h = template_using_directive_typedef.Holder();
|
||||
h.holder_use1(vo, vo, vo);
|
||||
h.holder_use2(vo, vo, vo);
|
||||
h.holder_use3(vo, vo, vo);
|
||||
|
||||
template_using_directive_typedef.tns_holder_use(vo, vo);
|
||||
template_using_directive_typedef.tns_use(vo, vo, vo);
|
||||
template_using_directive_typedef.global_holder_use(vo);
|
||||
template_using_directive_typedef.global_use(vo, vo, vo);
|
||||
template_using_directive_typedef.ns1_holder_use(vo);
|
||||
template_using_directive_typedef.ns2_holder_use(vo, vo, vo, vo);
|
||||
32
Examples/test-suite/python/typemap_template_typedef_runme.py
Normal file
32
Examples/test-suite/python/typemap_template_typedef_runme.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
from typemap_template_typedef import *
|
||||
|
||||
def check(got, expected):
|
||||
if got != expected:
|
||||
raise RuntimeError("got: " + str(got) + " expected: " + str(expected))
|
||||
|
||||
x = XXXInt()
|
||||
|
||||
check(x.aa1(0), 0)
|
||||
check(x.aa2(0), 55)
|
||||
check(x.aa3(0), 0)
|
||||
check(aa1(0), 0)
|
||||
check(aa2(0), 0)
|
||||
|
||||
check(x.bb1(0), 0)
|
||||
check(x.bb2(0), 66)
|
||||
check(x.bb3(0), 0)
|
||||
check(bb1(0), 0)
|
||||
check(bb2(0), 0)
|
||||
|
||||
check(x.cc1(0), 0)
|
||||
check(x.cc2(0), 77)
|
||||
check(x.cc3(0), 77)
|
||||
check(cc1(0), 0)
|
||||
check(cc2(0), 0)
|
||||
|
||||
check(x.dd1(0), 0)
|
||||
check(x.dd2(0), 88)
|
||||
check(x.dd3(0), 0)
|
||||
check(dd1(0), 0)
|
||||
check(dd2(0), 0)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue