mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Fixing compile errors
This commit is contained in:
parent
7b05beae90
commit
6aa10131a2
|
@ -53,8 +53,8 @@ class optional
|
|||
/// <summary>
|
||||
/// Default equality operation, just uses operator==
|
||||
/// </summary>
|
||||
template <typename T, typename std::enable_if<!std::is_floating_point_v<T>>::type * = nullptr>
|
||||
constexpr bool compare_equal(const T &lhs, const T &rhs) const
|
||||
template <typename U = T, typename std::enable_if<!std::is_floating_point<U>::value>::type * = nullptr>
|
||||
constexpr bool compare_equal(const U &lhs, const U &rhs) const
|
||||
{
|
||||
return lhs == rhs;
|
||||
}
|
||||
|
@ -62,8 +62,8 @@ class optional
|
|||
/// <summary>
|
||||
/// equality operation for floating point numbers. Provides "fuzzy" equality
|
||||
/// </summary>
|
||||
template <typename T, typename std::enable_if<std::is_floating_point_v<T>>::type * = nullptr>
|
||||
constexpr bool compare_equal(const T &lhs, const T &rhs) const
|
||||
template <typename U = T, typename std::enable_if<std::is_floating_point<U>::value>::type * = nullptr>
|
||||
constexpr bool compare_equal(const U &lhs, const U &rhs) const
|
||||
{
|
||||
return detail::float_equals(lhs, rhs);
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ float_equals(const LNumber &lhs, const RNumber &rhs,
|
|||
return false;
|
||||
}
|
||||
// a type that lhs and rhs can agree on
|
||||
using common_t = std::common_type_t<LNumber, RNumber>;
|
||||
using common_t = std::common_type<LNumber, RNumber>::type;
|
||||
// epsilon type defaults to float because even if both args are a higher precision type
|
||||
// either or both could have been promoted by prior operations
|
||||
// if a higher precision is required, the template type can be changed
|
||||
|
|
Loading…
Reference in New Issue
Block a user