[libcxx-commits] [libcxx] [libcxx] makes `pair` conditionally trivially copyable for C++20 (PR #84811)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 11 20:03:26 PDT 2024


frederick-vs-ja wrote:

> It's currently unclear how to implement this without using a _requires-clause_, so the feature is restricted to C++20 for now, but backporting this to C++11 would be ideal.

It seems that `pair` is allowed to have base classes, and thus we can implement the conditional triviality with the tricks used in `optional` and `variant`.

https://github.com/llvm/llvm-project/pull/84811


More information about the libcxx-commits mailing list