Log in

View Full Version : New C++-oriented `rdmconst.h` header


shawn
July 20th, 2019, 09:20 AM
I recreated the intent of `rdm.h` into a new, more C++-oriented, `rdmconst.h` file. Notes about the file:

Uses `constexpr` instead of `#define`s.
Fixes some spelling mistakes from the standard by introducing new constants, but keeping the old constants and tagging them with `[[deprecated("spelling")]]`.
Puts everything into an `rdm` namespace.


Feel free to make comments and suggestions. Consider this a beta version.

The file is attached.

shawn
July 20th, 2019, 01:32 PM
I've updated to a new version with more constants from E1.37-7. This one is `rdmconst-beta2.h`.

bootress
January 16th, 2020, 10:59 AM
I'm replying to this way late since Scott reminded me about the forums last night, but I love this!!

One thing to note - using the [[deprecated]] attribute makes this usable in a minimum C++14 environment. We do encounter older toolchains than that, especially in the RDM world, so it might be worth adding that fact as a comment.