From 16c86638a52bdf24af6d2cf64ac18ce24782cbb2 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Thu, 6 Apr 2017 18:31:21 -0400 Subject: [PATCH] Remove object::borrowed/stolen PR #771 deprecated them as they can cause linking failures (#770), but the deprecation tags cause warnings on GCC 5.x through 6.2.x. Removing them entirely will break backwards-compatibility consequences, but the effects should be minimal (only code that was inheriting from `object` could get at them at all as they are protected). Fixes #777 --- include/pybind11/pytypes.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index 4df3d9637..805b04fcd 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -236,11 +236,6 @@ protected: // Tags for choosing constructors from raw PyObject * struct borrowed_t { }; struct stolen_t { }; - // These can cause linkage problems; see #770 - PYBIND11_DEPRECATED("Use of the `borrowed` static variable is deprecated; use `borrowed_t{}' instead") - static constexpr borrowed_t borrowed{}; - PYBIND11_DEPRECATED("Use of the `stolen` static variable is deprecated; use `stolen_t{}' instead") - static constexpr stolen_t stolen{}; template friend T reinterpret_borrow(handle); template friend T reinterpret_steal(handle);