Model RealTime 11, version 2020.45, is now available for download. Let's take a look at some of the improvements implemented in this release.
The model compiler now supports member operations with template parameters. Both type and value template parameters are supported. Note that in most cases such operations must be marked as inline so that the implementation gets generated into the header file.
In the previous release we introduced the support for C++ 11 type aliases which is a modern alternative to traditional typedefs. In this release it's now possible to write a custom type descriptor for a type alias. This means that you now can replace typedefs with type aliases also when a custom type descriptor is required. For type aliases of STL collection types (list, set, map etc) you can use the Type Descriptor Hint property to instruct the model compiler to generate a type descriptor automatically for such types.
We have done a complete walkthrough of all code in the TargetRTS and removed all C-style casts, since many modern C++ compilers and static code analyzers report warnings for them. Such casts have either been removed (if they were unnecessary), or replaced with corresponding C++ casts (static_cast
or reinterpret_cast
). The model compiler was also updated in a similar way, to not generate C-style casts anymore.
A benefit with this improvement is that the TargetRTS and generated code now can be compiled without use of the GCC -fpermissive
flag, which helps in finding potential problems in the code.
Mattias Mohlin
Architect for IBM Model RealTime