- .travis.yml:
- ppa:kwwette/octaves has Octave version 4.2, also run C++11 tests
- configure.ac:
- prefer Octave program "octave-cli" to "octave"
- extract any -std=* flags from CXX, add to OCTAVE_CXXFLAGS
- Lib/typemaps/fragments.swg:
- SWIG_isfinite_func(): extern "C++" is required as this fragment can
end up inside an extern "C" { } block
- Lib/octave:
- add std_wstring.i (copied from std_string.i) for C++11 tests
- Lib/octave/octrun.swg:
- move Octave version-checking macros to octruntime.swg
- Octave single()/double() functions now call .as_single()/.as_double()
methods; redirect calls to __float__() method as per .scalar_value()
- << and >> operators are no longer supported by Octave
- Lib/octave/octruntime.swg:
- move Octave version-checking macros here for conditional #includes
- #include interpreter.h instead of #toplev.h
- #include call-stack.h (now needed for octave_call_stack)
- unwind_protect is now in octave:: namespace
- error_state and warning_state are deprecated; use try/catch to catch
errors in feval() instead
- always set octave_exit = ::_Exit, to try to prevent segfault on exit
- Lib/octave/octopers.swg:
- << and >> operators are no longer supported by Octave
- Lib/octave/exception.i:
- Add macro SWIG_RETHROW_OCTAVE_EXCEPTIONS which rethrows any
exceptions raised by Octave >= 4.2
- Examples/test-suite/exception_order.i:
- Use macro SWIG_RETHROW_OCTAVE_EXCEPTIONS to rethrow exceptions
raised by error() function in Octave >= 4.2
- Update Doc/Manual/Octave.html and CHANGES.current
86 lines
2.6 KiB
Text
86 lines
2.6 KiB
Text
/* ------------------------------------------------------------
|
|
* Overloaded operator support
|
|
* ------------------------------------------------------------ */
|
|
|
|
#ifdef __cplusplus
|
|
|
|
// operators supported in Octave, and the methods they are routed to
|
|
|
|
// __brace__ a{args}
|
|
// __brace_asgn__ a{args} = rhs
|
|
// __paren__ a(args)
|
|
// __paren_asgn__ a(args) = rhs
|
|
// __str__ generates string rep
|
|
|
|
// __not__ !a
|
|
// __uplus__ +a
|
|
// __uminus__ -a
|
|
// __transpose__ a.'
|
|
// __hermitian__ a'
|
|
// __incr__ a++
|
|
// __decr__ a--
|
|
// __add__ a + b
|
|
// __sub__ a - b
|
|
// __mul__ a * b
|
|
// __div__ a / b
|
|
// __pow__ a ^ b
|
|
// __ldiv__ a \ b
|
|
// __lt__ a < b
|
|
// __le__ a <= b
|
|
// __eq__ a == b
|
|
// __ge__ a >= b
|
|
// __gt__ a > b
|
|
// __ne__ a != b
|
|
// __el_mul__ a .* b
|
|
// __el_div__ a ./ b
|
|
// __el_pow__ a .^ b
|
|
// __el_ldiv__ a .\ b
|
|
// __el_and__ a & b
|
|
// __el_or__ a | b
|
|
|
|
// operators supported in C++, and the methods that route to them
|
|
|
|
%rename(__add__) *::operator+;
|
|
%rename(__add__) *::operator+();
|
|
%rename(__add__) *::operator+() const;
|
|
%rename(__sub__) *::operator-;
|
|
%rename(__uminus__) *::operator-();
|
|
%rename(__uminus__) *::operator-() const;
|
|
%rename(__mul__) *::operator*;
|
|
%rename(__div__) *::operator/;
|
|
%rename(__mod__) *::operator%;
|
|
%rename(__el_and__) *::operator&&;
|
|
%rename(__el_or__) *::operator||;
|
|
%rename(__xor__) *::operator^;
|
|
%rename(__invert__) *::operator~;
|
|
%rename(__lt__) *::operator<;
|
|
%rename(__le__) *::operator<=;
|
|
%rename(__gt__) *::operator>;
|
|
%rename(__ge__) *::operator>=;
|
|
%rename(__eq__) *::operator==;
|
|
%rename(__ne__) *::operator!=;
|
|
%rename(__not__) *::operator!;
|
|
%rename(__incr__) *::operator++;
|
|
%rename(__decr__) *::operator--;
|
|
%rename(__paren__) *::operator();
|
|
%rename(__brace__) *::operator[];
|
|
|
|
// Ignored inplace operators
|
|
%ignoreoperator(PLUSEQ) operator+=;
|
|
%ignoreoperator(MINUSEQ) operator-=;
|
|
%ignoreoperator(MULEQ) operator*=;
|
|
%ignoreoperator(DIVEQ) operator/=;
|
|
%ignoreoperator(MODEQ) operator%=;
|
|
%ignoreoperator(LSHIFTEQ) operator<<=;
|
|
%ignoreoperator(RSHIFTEQ) operator>>=;
|
|
%ignoreoperator(ANDEQ) operator&=;
|
|
%ignoreoperator(OREQ) operator|=;
|
|
%ignoreoperator(XOREQ) operator^=;
|
|
|
|
// Ignored operators
|
|
%ignoreoperator(EQ) operator=;
|
|
%ignoreoperator(ARROWSTAR) operator->*;
|
|
%ignoreoperator(LSHIFT) operator<<;
|
|
%ignoreoperator(RSHIFT) operator>>;
|
|
|
|
#endif /* __cplusplus */
|