Convert brand-pointer to constexpr-function (1/3)
MSVC erroneously refuses to compile code which calculates the address of objects of static storage duration at compile-time, despite this being legal. Work around this by changing `_capnpPrivate::brand` from constexpr pointers to static constexpr functions returning pointers. The compiler is then free to calculate it at compile-time if it can (gcc, clang), but can also defer it to run-time if it can't (MSVC). This change is split into three commits: 1. Changes to the code generator (this commit). 2. A bootstrap regeneration, after which the codebase will not compile. 3. Changes to the generated code support header, after which the codebase will again compile.
Showing
Please
register
or
sign in
to comment