diff --git a/include/xlnt/utils/optional.hpp b/include/xlnt/utils/optional.hpp
index 4f56c812..757c90ea 100644
--- a/include/xlnt/utils/optional.hpp
+++ b/include/xlnt/utils/optional.hpp
@@ -53,8 +53,8 @@ class optional
///
/// Default equality operation, just uses operator==
///
- template >::type * = nullptr>
- constexpr bool compare_equal(const T &lhs, const T &rhs) const
+ template ::value>::type * = nullptr>
+ constexpr bool compare_equal(const U &lhs, const U &rhs) const
{
return lhs == rhs;
}
@@ -62,8 +62,8 @@ class optional
///
/// equality operation for floating point numbers. Provides "fuzzy" equality
///
- template >::type * = nullptr>
- constexpr bool compare_equal(const T &lhs, const T &rhs) const
+ template ::value>::type * = nullptr>
+ constexpr bool compare_equal(const U &lhs, const U &rhs) const
{
return detail::float_equals(lhs, rhs);
}
diff --git a/source/detail/numeric_utils.hpp b/source/detail/numeric_utils.hpp
index 737992f5..2e3a0de9 100644
--- a/source/detail/numeric_utils.hpp
+++ b/source/detail/numeric_utils.hpp
@@ -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;
+ using common_t = std::common_type::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