From 1b72597be02fd79354f8238acb40fe778ca4c891 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Tue, 24 Mar 2026 17:47:52 -0400 Subject: [PATCH] xo-facet: bugfix: is_convertible_v usage is_convertible_v can be false if T isn't copyable. since dealing with a T pointer, actually want is_convertible_v --- include/xo/facet/OObject.hpp | 4 ++-- include/xo/facet/facet_implementation.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/xo/facet/OObject.hpp b/include/xo/facet/OObject.hpp index 24397e5..3968286 100644 --- a/include/xo/facet/OObject.hpp +++ b/include/xo/facet/OObject.hpp @@ -180,7 +180,7 @@ namespace xo { * Either way need to force vtable replacement, hence memcpy here */ _launder_from(oother); - } else if constexpr (std::is_convertible_v) { + } else if constexpr (std::is_convertible_v) { /* other is typed, consistently with *this */ this->from_data(oother.data()); } else @@ -189,7 +189,7 @@ namespace xo { // + may fail at runtime static_assert(std::is_same_v - || std::is_convertible_v); + || std::is_convertible_v); } return *this; } diff --git a/include/xo/facet/facet_implementation.hpp b/include/xo/facet/facet_implementation.hpp index 7ce2ed5..d8a78f6 100644 --- a/include/xo/facet/facet_implementation.hpp +++ b/include/xo/facet/facet_implementation.hpp @@ -102,7 +102,7 @@ namespace xo { /** Retrieve facet implementation for a (facet,datatype) pair **/ template - using FacetImplType = FacetImplementation::ImplType; + using FacetImplType = typename FacetImplementation::ImplType; /** Use: * auto iface = xo::facet::impl_for();