Allow <, >, <=, >=, !=, ==, and % in constant expressions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9329 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f4bc2780b1
commit
fb93e2ff91
4 changed files with 90 additions and 21 deletions
|
|
@ -27,6 +27,25 @@ class X {};
|
|||
%template(X_1024div8) X<1024/8>;
|
||||
|
||||
|
||||
// bug #646275
|
||||
|
||||
%inline %{
|
||||
template<typename Type, short Rank>
|
||||
class Test {
|
||||
/**** conditional return type TestRm1 =
|
||||
Test<Type,Rank-1> oder Type: ****/
|
||||
template<bool cond, class T1, class T2> class
|
||||
CondRetType { typedef T1 TestRm1; };
|
||||
template<class T1, class T2> class
|
||||
CondRetType<false, T1, T2> { typedef T2 TestRm1; };
|
||||
typedef typename CondRetType< Rank!=1,
|
||||
Test<Type,Rank-1>, Type>::TestRm1 TestRm1;
|
||||
public:
|
||||
Test() {};
|
||||
};
|
||||
%}
|
||||
|
||||
|
||||
// bug 1338527
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue