Remove -cppcast and -nocppcast command line options

The -cppcast option is still turned on by default. The -nocppcast option
to turn off the use of c++ casts (const_cast, static_cast etc) has been
removed. However, defining SWIG_NO_CPLUSPLUS_CAST will still generate C casts
instead of C++ casts for C++ wrappers.
This commit is contained in:
William S Fulton 2018-10-25 08:07:08 +01:00
commit c06f2b4497
7 changed files with 45 additions and 87 deletions

View file

@ -31,7 +31,7 @@
%as_voidptrptr(a) reinterpret_cast<void **>(a)
or their C unsafe versions. In C++ we use the safe version unless
SWIG_NO_CPLUSPLUS_CAST is defined (usually via the -nocppcast swig flag).
SWIG_NO_CPLUSPLUS_CAST is defined
Memory allocation:
@ -123,14 +123,7 @@ nocppval
* Casting operators
* ----------------------------------------------------------------------------- */
#if defined(SWIG_NO_CPLUSPLUS_CAST)
/* Disable 'modern' cplusplus casting operators */
# if defined(SWIG_CPLUSPLUS_CAST)
# undef SWIG_CPLUSPLUS_CAST
# endif
#endif
#if defined(__cplusplus) && defined(SWIG_CPLUSPLUS_CAST)
#if defined(__cplusplus) && !defined(SWIG_NO_CPLUSPLUS_CAST)
# define %const_cast(a,Type...) const_cast< Type >(a)
# define %static_cast(a,Type...) static_cast< Type >(a)
# define %reinterpret_cast(a,Type...) reinterpret_cast< Type >(a)