I have a major and a minor version number available in two preprocessor defines
#define i 123
#define f 4567
and need to provide a function which returns them combined as a double value where the major number is the integral and the minor number the fractional part.
Besides just repeating those numbers, all solutions i could come up with are quite expressive; see for example here: https://godbolt.org/z/rg3GyR
Without constexpr it would get even more expressive but could be done as well.
In MS world, i got away with
#define me i.f
double df() { return me; }
but Standard C++ doesn't offer that possibility.
I'm wondering if there exists a simple standard conformant way to do that.