From 81f35d29c621ce2ba8a82eebeb6ad97f842983c0 Mon Sep 17 00:00:00 2001 From: Aaron Gokaslan Date: Sat, 20 Aug 2022 17:05:07 -0400 Subject: [PATCH] chore: Mark detail:forward_like as constexpr (#4147) --- include/pybind11/stl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/stl.h b/include/pybind11/stl.h index 6426bff08..48031c2a6 100644 --- a/include/pybind11/stl.h +++ b/include/pybind11/stl.h @@ -45,7 +45,7 @@ using forwarded_type = conditional_t::value, /// Forwards a value U as rvalue or lvalue according to whether T is rvalue or lvalue; typically /// used for forwarding a container's elements. template -forwarded_type forward_like(U &&u) { +constexpr forwarded_type forward_like(U &&u) { return std::forward>(std::forward(u)); }