mirror of
https://github.com/cuberite/cuberite.git
synced 2025-01-07 03:16:55 +08:00
Remove simple template-id from constructors for Vector3 template. (#5586)
This was removed from the C++ standard in C++20; annoying warnings are produced by modern C++ compilers. https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2237
This commit is contained in:
parent
ab62fc3988
commit
8ca73f1929
@ -31,14 +31,14 @@ public:
|
||||
// tolua_end
|
||||
// Conversion constructors where U is not the same as T leaving the copy-constructor implicitly generated
|
||||
template <typename U, std::enable_if_t<(!std::is_same<U, T>::value) && ((!std::is_integral<T>::value) || (std::is_integral<U>::value)), bool> = true>
|
||||
constexpr Vector3<T>(const Vector3<U> & a_Rhs):
|
||||
constexpr Vector3(const Vector3<U> & a_Rhs):
|
||||
x(static_cast<T>(a_Rhs.x)),
|
||||
y(static_cast<T>(a_Rhs.y)),
|
||||
z(static_cast<T>(a_Rhs.z))
|
||||
{
|
||||
}
|
||||
template <typename U, std::enable_if_t<(!std::is_same<U, T>::value) && ((std::is_integral<T>::value) && (!std::is_integral<U>::value)), bool> = true>
|
||||
constexpr Vector3<T>(const Vector3<U> & a_Rhs):
|
||||
constexpr Vector3(const Vector3<U> & a_Rhs):
|
||||
x(static_cast<T>(std::floor(a_Rhs.x))),
|
||||
y(static_cast<T>(std::floor(a_Rhs.y))),
|
||||
z(static_cast<T>(std::floor(a_Rhs.z)))
|
||||
|
Loading…
Reference in New Issue
Block a user