// Copyright (c) 2021 The Pybind Development Team. // All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #pragma once #include "pybind11.h" PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) // Supports easier switching between py::class_ and py::class_: // users can simply replace the `_` in `class_` with `h` or vice versa. // Note though that the PYBIND11_SMART_HOLDER_TYPE_CASTERS(U) macro also needs to be // added (for `classh`) or commented out (for `class_`). template class classh : public class_ { public: using class_::class_; }; // Similar in idea to `py::classh`, but for `std::unique_ptr` holder, to support // an easier transition to `py::smart_holder` as default holder. template class classu : public class_, options...> { public: using class_, options...>::class_; }; PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)