Adding full support for these in expressions seems hard to do without introducing conflicts into the parser grammar, but in fact all reported cases have had parentheses around the comparison and we can support that with a few restrictions on the left side of `<`. Fixes #80 and #635. Also https://sourceforge.net/p/swig/bugs/1139/
17 lines
289 B
OpenEdge ABL
17 lines
289 B
OpenEdge ABL
%module constant_expr;
|
|
/* Tests of constant expressions (C++ version). */
|
|
|
|
%include "constant_expr_c.i"
|
|
|
|
%inline %{
|
|
|
|
// Testcase from https://sourceforge.net/p/swig/bugs/1139/
|
|
template<typename Tp>
|
|
struct SizeInfo {
|
|
enum {
|
|
isLarge = (sizeof(Tp)>sizeof(void*)),
|
|
isPointer = false
|
|
};
|
|
};
|
|
|
|
%}
|