forked from mpusz/mp-units
Attempt to satisfy MSVC 14
``` test\unit_test\runtime\magnitude_test.cpp(143): error C2672: 'units::check_same_type_and_value': no matching overloaded function found ``` Maybe it's confused by accessing the static member variable template using dot-notation on an _instance_? If so, let's see how it likes the member-function syntax.
This commit is contained in:
@@ -339,6 +339,11 @@ struct magnitude {
|
||||
requires (std::is_floating_point_v<T> || (detail::is_integral(BPs) && ...))
|
||||
static constexpr T value = detail::checked_static_cast<T>(
|
||||
(detail::compute_base_power<T>(BPs) * ...));
|
||||
|
||||
// Trying to satisfy MSVC 14...
|
||||
template<typename T>
|
||||
requires (std::is_floating_point_v<T> || (detail::is_integral(BPs) && ...))
|
||||
constexpr T get_value() const { return magnitude::value<T>; }
|
||||
};
|
||||
|
||||
// Implementation for Magnitude concept (below).
|
||||
|
||||
Reference in New Issue
Block a user