[libcxx-commits] [libcxx] [libc++] Add __simple_tuple and replace a bunch of uses of tuple with it (PR #214566)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 19 11:12:56 PDT 2026


================
@@ -484,20 +482,14 @@ public:
       : __t_(__margs...) {}
 
   _LIBCPP_RELEASE_CAPABILITY() _LIBCPP_HIDE_FROM_ABI ~scoped_lock() {
-    __unlock_unpack(make_index_sequence<sizeof...(_MArgs)>(), __t_);
+    _TupleT::__apply(__t_, [] _LIBCPP_NO_THREAD_SAFETY_ANALYSIS(auto&... __args) { (__args.unlock(), ...); });
----------------
philnik777 wrote:

You end up with the same number of instantiations AFAICT. This is instantiated exactly once per `scoped_lock`.

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


More information about the libcxx-commits mailing list