From 1ebac536f33fe883c8aaa18927600f3e691f7767 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 8 Dec 2022 23:25:36 -0800 Subject: [PATCH] clang-format automatic changes (due to clang-format update on master) --- include/pybind11/detail/init.h | 34 +++++++++++++++++----------------- tests/test_descr_src_loc.cpp | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/pybind11/detail/init.h b/include/pybind11/detail/init.h index 0339765e7..d02310fb0 100644 --- a/include/pybind11/detail/init.h +++ b/include/pybind11/detail/init.h @@ -157,9 +157,9 @@ void construct(value_and_holder &v_h, Alias *alias_ptr, bool) { // holder. This also handles types like std::shared_ptr and std::unique_ptr where T is a // derived type (through those holder's implicit conversion from derived class holder // constructors). -template < - typename Class, - detail::enable_if_t>::value, int> = 0> +template >::value, int> + = 0> void construct(value_and_holder &v_h, Holder holder, bool need_alias) { PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(need_alias); auto *ptr = holder_helper>::get(holder); @@ -201,10 +201,10 @@ void construct(value_and_holder &v_h, Alias &&result, bool) { v_h.value_ptr() = new Alias(std::move(result)); } -template < - typename Class, - typename D = std::default_delete>, - detail::enable_if_t>::value, int> = 0> +template >, + detail::enable_if_t>::value, int> + = 0> void construct(value_and_holder &v_h, std::unique_ptr, D> &&unq_ptr, bool need_alias) { PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(need_alias); auto *ptr = unq_ptr.get(); @@ -224,10 +224,10 @@ void construct(value_and_holder &v_h, std::unique_ptr, D> &&unq_ptr, v_h.type->init_instance(v_h.inst, &smhldr); } -template < - typename Class, - typename D = std::default_delete>, - detail::enable_if_t>::value, int> = 0> +template >, + detail::enable_if_t>::value, int> + = 0> void construct(value_and_holder &v_h, std::unique_ptr, D> &&unq_ptr, bool /*need_alias*/) { @@ -239,9 +239,9 @@ void construct(value_and_holder &v_h, v_h.type->init_instance(v_h.inst, &smhldr); } -template < - typename Class, - detail::enable_if_t>::value, int> = 0> +template >::value, int> + = 0> void construct(value_and_holder &v_h, std::shared_ptr> &&shd_ptr, bool need_alias) { PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(need_alias); auto *ptr = shd_ptr.get(); @@ -255,9 +255,9 @@ void construct(value_and_holder &v_h, std::shared_ptr> &&shd_ptr, boo v_h.type->init_instance(v_h.inst, &smhldr); } -template < - typename Class, - detail::enable_if_t>::value, int> = 0> +template >::value, int> + = 0> void construct(value_and_holder &v_h, std::shared_ptr> &&shd_ptr, bool /*need_alias*/) { diff --git a/tests/test_descr_src_loc.cpp b/tests/test_descr_src_loc.cpp index 34bbb195d..8032f318d 100644 --- a/tests/test_descr_src_loc.cpp +++ b/tests/test_descr_src_loc.cpp @@ -90,7 +90,7 @@ struct block_int_to_str { TEST_SUBMODULE(descr_src_loc, m) { using namespace pybind11_tests::descr_src_loc; -# define ATTR_OFFS(B) m.attr(# B "_offset") = B::offset; +# define ATTR_OFFS(B) m.attr(#B "_offset") = B::offset; # define ATTR_BLKC(B, C) \ m.attr(#B "_" #C) = py::make_tuple(B::C.text, B::C.sloc.file, B::C.sloc.line);