================
@@ -0,0 +1,17 @@
+.. title:: clang-tidy - modernize-make-direct
+
+modernize-make-direct
+====================
+
+Replaces ``std::make_*`` function calls with direct constructor calls using 
class template
+argument deduction (CTAD).
+
+================================== ====================================
+  Before                             After
+---------------------------------- ------------------------------------
+``std::make_optional<int>(42)``    ``std::optional(42)``
+``std::make_unique<Widget>(1)``    ``std::unique_ptr(new Widget(1))``
+``std::make_shared<Widget>(2)``    ``std::shared_ptr(new Widget(2))``
+``std::make_pair(1, "test")``      ``std::pair(1, "test")``
----------------
denzor200 wrote:

forgot about ``std::make_tuple(1, "test")``      ``std::tuple(1, "test")``

https://github.com/llvm/llvm-project/pull/118120
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to