1.. title:: clang-tidy - abseil-cleanup-ctad 2 3abseil-cleanup-ctad 4=================== 5 6Suggests switching the initialization pattern of ``absl::Cleanup`` 7instances from the factory function to class template argument 8deduction (CTAD), in C++17 and higher. 9 10.. code-block:: c++ 11 12 auto c1 = absl::MakeCleanup([] {}); 13 14 const auto c2 = absl::MakeCleanup(std::function<void()>([] {})); 15 16becomes 17 18.. code-block:: c++ 19 20 absl::Cleanup c1 = [] {}; 21 22 const absl::Cleanup c2 = std::function<void()>([] {}); 23