Skip to content

v1.7.0

Choose a tag to compare

@grasph grasph released this 10 Oct 20:24
· 4 commits to main since this release

New features

Note a release v1.6.0 was tagged in the github repository, but with no file bundle published in this release section and without release notes. The release note below covers changes since v1.5.0.

List of new features

  • Automation Generation of StictlyTypedNumber argument type.
  • Multiple inheritance
  • C++-to-C++ type map (experimental)
  • Argument name support
  • Runtime switch for verbose impot
  • Class ordering constraints
  • CxxWrap v0.17.x support

Details on each new features follow.

Automation Generation of StictlyTypedNumber argument type.

By default, for method arguments, CxxWrap maps any integer types to Integer and
floating point types to AbstractFloat, extending e.g., a function f(int) to
f(short), and making the required implicit type cnversions. This causes two
problems in case the C++ code already overloads the function for different
integer or floating types:

  • a wrong overloaded function can be called
  • it prevents module precompilation with an error about "method overwrite".

With this modification, jlcxx:StrictlyTypesNumber<> is used in the definition of
the wrappers of functions overloaded for different number types, to disable the
type widening. Note it does also in interger type is overloaded by a floating
point type, which is not nesseraly. This will be eventual be changed.

Multiple inheritance

Wrappers are now generated for public methods coming from other inheritances than the one mapped to Julia.

C++-to-C++ type (experimental)

Add the possibility to change the type of a function pass-by-value argument or return value exposed to CxxWrap to an equivalent type (either as alias or via a cast function) by providing a map in the new configuration parameter cxx2cxx_type_map.

Argument name support

If code is generated for CxxWrap release 0.15.0 or above, then the method argument names are passed to their julia wrapper with the jlcxx::argname featured added with this release.

Runtime switch for verbose impot

Add suppport to enable verbose import at runtime by defining the WRAPIT_VERBOSE_INPUT environment variable, which as the same effect as the VERBOSE_INPUT compilation option.

Class ordering constraints

New class_order_contraints configuration parameter to allow tuning of type wrapper declaration order

CxxWrap v0.17.x support

Adde support for CxxWrap v0.17.x and made runtime check of libcxxwrap release more strict

Behaviour Improvements

  • Change behaviour in case of error in the parsed code. Now the errors found by clang are displayed and no code is generated (except if forced by the ignore_parsing_errors configurartion parameter). In particular, this prevents to have function argument types silently changed to int in case of a missing header.
  • Disable generation of function that returns a function pointer.
  • Prevent generation of wrapper of deleted copy operators.
  • Disable generation of wrapper of std containers deque, queue, set, multiset natively supported by CxxWrap.
  • "void" return type is removed from the constructor signatures. This is a breaking change of the veto file: vetoed contructors must be listed with no return type.

Bug fixes

  • Update mode now set to false as default, as it was expected to be.
  • Fix wrapper of template class methods that uses one or more argument whose type is defined within same class (issue #72)
  • Fix issue with anonymous struct that was leading to generation of invalid code. They are no ignored as they were expected to be. That solves the issue #71

Full Changelog: v1.5.0...v1.7.0


Contributors to the code update with respect to release 1.5.0 (surname alphabetic order): Erwan Demairy (issue report), Philippe Gras, Dennis Ogiermann (issue report)