COMP: avoid ambiguous type conversion in Clang (fixes #3138)

This commit is contained in:
Kutalmis Bercin 2024-04-11 09:31:27 +01:00
parent d578d48a4f
commit 752ab418c9

View File

@ -94,7 +94,7 @@ inline constexpr const one& operator/(const one& o, const one&) noexcept
template<class Type>
inline Type operator/(const one&, const Type& val)
{
return scalar(1)/val;
return Type(scalar(1)/val);
}
template<class Type>
@ -111,13 +111,13 @@ inline constexpr const one& min(const one& o, const one&) noexcept
template<class Type>
inline Type min(const one&, const Type& t) noexcept
{
return min(scalar(1), t);
return Type(min(scalar(1), t));
}
template<class Type>
inline Type min(const Type& t, const one&) noexcept
{
return min(t, scalar(1));
return Type(min(t, scalar(1)));
}
inline constexpr const one& max(const one& o, const one&) noexcept
@ -128,13 +128,13 @@ inline constexpr const one& max(const one& o, const one&) noexcept
template<class Type>
inline Type max(const one&, const Type& t) noexcept
{
return max(scalar(1), t);
return Type(max(scalar(1), t));
}
template<class Type>
inline Type max(const Type& t, const one&) noexcept
{
return max(t, scalar(1));
return Type(max(t, scalar(1)));
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //