mark_immutable_if_constexpr 需要更多的 constexpr 容器吗?

Is mark_immutable_if_constexpr needed for more constexpr containers?

已接受的 C++20 提案中的第一个代码示例 "More constexpr containers"(P0784) uses a function std::mark_immutable_if_constexpr. Was that function accepted as part of the same proposal? I see here GCC 10 在一组标记为 "Relaxations of constexpr restrictions" 的提案中支持 P0784,但 std::mark_immutable_if_constexpr不包含在 GCC 10 中。std::mark_immutable_if_constexpr 是否需要使用 P0784?

Was that function accepted as part of the same proposal?

函数mark_immutable_if_constexpr不在提案中,也不在C++20中。它已从早期草稿中删除:

Remove non-transient allocation handling because EWG did not like mark_immutable_if_constexpr and the problem of the R4 status quo is potentially difficult to evolve.

你也可以看到论文的措辞并没有介绍这个新功能