From d71ba0cb73616c493d35699a8a9283aa64ef0f6b Mon Sep 17 00:00:00 2001 From: Aaron Gokaslan Date: Thu, 2 Sep 2021 15:18:42 -0400 Subject: [PATCH] (perf): Add a missing noexcept to a pytype constructor (#3236) * Add a missing noexcept to pytypes constructor. Adds a few missing noexcept to PyType constructors for perf reasons. * Revert exception ctor --- include/pybind11/pytypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index 5e699e53f..fa50eb1e3 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -761,7 +761,7 @@ template struct arrow_proxy { T value; - arrow_proxy(T &&value) : value(std::move(value)) { } + arrow_proxy(T &&value) noexcept : value(std::move(value)) { } T *operator->() const { return &value; } };