[libcxx-commits] [clang] [libcxx] [clang & libcxx] constexpr pointer tagging (DO NOT MERGE) (PR #111861)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 15 23:47:12 PDT 2026
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/111861 at github.com>
================
----------------
frederick-vs-ja wrote:
Ditto double underscore. IIUC, `_alignment_needed` etc. are not even resolved here per the C++ core language specifications, and users are even permitted to observe such a spelling.
```suggestion
static constexpr unsigned __alignment_needed = (1u << Bits);
static constexpr uintptr_t __tag_mask = (__alignment_needed - 1u);
static constexpr uintptr_t __pointer_mask = ~__tag_mask;
```
https://github.com/llvm/llvm-project/pull/111861
More information about the libcxx-commits
mailing list