diff --git a/include/iris/x4/core/move_to.hpp b/include/iris/x4/core/move_to.hpp index 025c2da7f..95a837160 100644 --- a/include/iris/x4/core/move_to.hpp +++ b/include/iris/x4/core/move_to.hpp @@ -209,13 +209,13 @@ move_to(It first, Se last, Dest& dest) { static_assert(!std::same_as, unused_type>); static_assert(!std::same_as, unused_container_type>); - static_assert( - // If either `It` or `Dest` is relevant to any character type, - (!CharLike>> && !CharLike::type>>) || - // ... then do the check below: - !CharIncompatibleWith>, std::remove_cvref_t::type>>, - "Mixing incompatible char types is not allowed" - ); + + if constexpr (CharLike>> && CharLike::type>>) { + static_assert( + std::same_as>, std::remove_cvref_t::type>>, + "Mixing incompatible char types is not allowed" + ); + } if constexpr (!is_ttp_specialization_of_v) { if (!traits::is_empty(dest)) { @@ -265,7 +265,7 @@ move_to(Source&& src, Dest& dest) { static_assert(!std::same_as, Dest>, "[BUG] This call should instead resolve to the overload handling identical types"); - if constexpr (std::same_as, typename traits::container_value::type>) { + if constexpr (std::constructible_from::type, Source>) { traits::push_back(dest, std::forward(src)); } else { if constexpr (std::is_rvalue_reference_v) {