Add interop API

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2026-03-12 00:13:58 +02:00
parent c4109f0ce3
commit 01538457a5
2 changed files with 118 additions and 0 deletions
+17
View File
@@ -1186,6 +1186,23 @@ template<typename T>
return m;
}
template<class Ext> struct interop_adapter;
template<class Ext>
constexpr auto from_external(Ext const &ext)
-> typename interop_adapter<Ext>::smath_type
{
return interop_adapter<Ext>::to_smath(ext);
}
template<class Ext, class SMathT>
constexpr auto to_external(SMathT const &value) -> Ext
{
return interop_adapter<Ext>::from_smath(value);
}
} // namespace smath
template<std::size_t N, typename T>