From 1b19fb79ac33e92a64688eae1d7d97bd93383b6c Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Mon, 18 Mar 2024 08:01:15 -0500 Subject: [PATCH] Avoid superfluous copy of dpctl_capi struct --- dpctl/apis/include/dpctl4pybind11.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dpctl/apis/include/dpctl4pybind11.hpp b/dpctl/apis/include/dpctl4pybind11.hpp index e71501fdaa..9006375587 100644 --- a/dpctl/apis/include/dpctl4pybind11.hpp +++ b/dpctl/apis/include/dpctl4pybind11.hpp @@ -402,8 +402,9 @@ class dpctl_capi dpctl_capi(dpctl_capi const &) = default; dpctl_capi &operator=(dpctl_capi const &) = default; + dpctl_capi &operator=(dpctl_capi &&) = default; - static dpctl_capi lookup() + static dpctl_capi &lookup() { static dpctl_capi api; return api;