[libcxx-commits] [libcxx] [libc++] Implement P0429R9 `std::flat_map` (PR #98643)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Sun Sep 29 02:03:14 PDT 2024


================
@@ -137,6 +137,11 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __exception_guard<_Rollback> __make_exce
   return __exception_guard<_Rollback>(std::move(__rollback));
 }
 
+template <class _Rollback>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __exception_guard_exceptions<_Rollback> __make_scoped_guard(_Rollback __rollback) {
----------------
frederick-vs-ja wrote:

> Is there a reason why `_LIBCPP_CONSTEXPR_SINCE_CXX20` is needed in any of the class in this file?

Constexpr-ness of these classes relies on constexpr destructors, which is introduced in C++20 by [P0784R7](https://wg21.link/p0784r7).

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


More information about the libcxx-commits mailing list