• Harris Hancock's avatar
    Convert brand-pointer to constexpr-function (1/3) · 1572e754
    Harris Hancock authored
    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.
    1572e754
Name
Last commit
Last update
c++ Loading commit data...
doc Loading commit data...
highlighting Loading commit data...
security-advisories Loading commit data...
.gitignore Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
RELEASE-PROCESS.md Loading commit data...
mega-test-quick.cfg Loading commit data...
mega-test.cfg Loading commit data...
mega-test.py Loading commit data...
release.sh Loading commit data...
style-guide.md Loading commit data...
super-test.sh Loading commit data...