This is a long-standing limitation, but only seems to have been reported
once back in 2004.
Nobody's cared enough to address it in 18 years, but we can at least
document it in the manual rather than only in a source code comment in
Source/Swig/symbol.c.
Addresses https://sourceforge.net/p/swig/bugs/429/
I don't think any valid C program can contain `<=>` in a tokenisable
context, but it's more helpful to fail with a syntax error at SWIG
parse time and not potentially generate C code trying to use `<=>` in
an expression which then fails at compile time.
This reverts commit 0ff9a0959a.
The modified fix breaks Java and C#, where C constant expressions
get used in the generated target language code in some cases.
Revert this fix for now.
Remove some erroneously added brackets_increment() calls.
Reject <=> in preprocessor expressions with a clear error message (it
seems it isn't supported here - clang and gcc don't at least).
The type returned by `<=>` is not `bool`. We pretend it's
`int` for now, which should work for how it's likely to be used
in constant expressions.
Fixes#1622
MSVC fails with:
cpp11_result_of_wrap.cxx(3211): error C2672: 'test_result_impl': no matching overloaded function found
cpp11_result_of_wrap.cxx(3211): error C2893: Failed to specialize function template 'std::result_of<Fun(Arg)>::type test_result_impl(Fun,Arg)'
cpp11_result_of_wrap.cxx(3150): note: see declaration of 'test_result_impl'
cpp11_result_of_wrap.cxx(3211): note: With the following template arguments:
cpp11_result_of_wrap.cxx(3211): note: 'Fun=double (__cdecl *)(double)'
cpp11_result_of_wrap.cxx(3211): note: 'Arg=int'
Try making the second parameter double to match the template.
MSVC now fails with:
error C4596: 'foo': illegal qualified name in member declaration
Such redundant qualification is invalid. Compilers used to be
permissive here (so it's useful for SWIG to handle it), but compilers
increasingly complain about it so adjust the testcase to show the
compiler a valid version, and only test the redundant qualification
with SWIG.