blob: 130dc390efb09493afc6e5b5fc2aac62d37f7b44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
%module template_base_template
%warnfilter(SWIGWARN_RUBY_WRONG_NAME) traits<double, double>; /* Ruby, wrong class name */
%warnfilter(SWIGWARN_PARSE_EXPLICIT_TEMPLATE);
%inline %{
template <class ArgType, class ResType>
struct traits
{
typedef ArgType arg_type;
typedef ResType res_type;
};
template <class ArgType, class ResType>
struct Funktion
{
};
// Egad!
template <class AF, class AG>
struct Klass
: Funktion<typename traits<AF, AG>::arg_type,
typename traits<AF, AG>::res_type>
{
};
%}
%{
template struct Funktion <double, double>;
template struct Klass <double, double>;
%}
%template(traits_dd) traits <double, double>;
%template(Funktion_dd) Funktion <double, double>;
%template(Klass_dd) Klass <double, double>;
|