When you want to register a method or a constructor which contains default arguments, you have to provide them RTTR explicitly. The reason for this is, default arguments are not part of the function signature. Nevertheless, RTTR provides a mechanism to register functions with default arguments.
Please take a look at following example:
The function has following synopsis:
The values will be copied internally and will be provided during invoke of the method or constructor, when the corresponding argument is missing:
- The given arguments must match the signature from the starting position to the right most argument.
The following snippet will not compile and will raise a static_assert: