#ifndef LIBADWAITAMM_HELPERS_GOBJ_MIXIN_HPP #define LIBADWAITAMM_HELPERS_GOBJ_MIXIN_HPP #include #include namespace Adwaita::helpers { template struct copy_const { using type = TargetType; }; template struct copy_const { using type = std::add_const_t; }; template using copy_const_t = typename copy_const::type; template struct gobj_mixin { template auto gobj(this Self && self) noexcept { using base_type = copy_const_t, BaseType>; return reinterpret_cast(self.::Glib::Object::gobj()); } template auto gobj_copy(this Self && self) noexcept { return reinterpret_cast(self.::Glib::Object::gobj_copy()); } }; } // namespace Adwaita::helpers #endif