BigUglySpider / EmuLibs

Selection of libraries designed to be used with Emu projects. This was originally a Math library only, but has since been changed to hold all Emu libraries to enable consistency in changes to dependencies (such as EmuCore modifications).
https://biguglyspider.github.io/math
0 stars 0 forks source link

Matrix and vector enable if corrections #56

Closed BigUglySpider closed 2 years ago

BigUglySpider commented 2 years ago

Addresses Issue #50 with a correction of std::enable_if usage for constructors in Vector and Matrix combined with SFINAE. Valid items now use a deferred Unused_ template parameter to save evaluation for calling time, which prevents the compiler from erroring on technically-correct-but-not-standard SFINAE blockers.

This also takes steps towards meeting the standard std::enable_if usage layout of

template<...>
constexpr inline auto some_function(...)
    -> std::enable_if<..., return_type>
{
   ...
}

This is most notably done in Vector and Matrix, with exceptions for incompatible functionalities such as cast operators and constructors. However, there may be more points to look at. They should be amended retroactively as they are not a massive priority.