79414617

Date: 2025-02-05 11:38:43
Score: 1
Natty:
Report link

I just want to add that after much research, I've come to the conclusion that there is no way currently to write a constexpr offset() in C++ (at least with version 20 and below, no clue about the next version), as crazy as it might sound…

No solutions suggested above actually work because they all use reinterpret_cast which is forbidden in constexpr. Edit : and to be more specific, c style cast (raw cast) equivalent to reinterpret_cast are forbidden too, quite obviously…

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Getter