forked from mpusz/mp-units
fix: a workaround for msvc 1929 added to validated_type
This commit is contained in:
@@ -61,6 +61,17 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if UNITS_COMP_MSVC && UNITS_COMP_MSVC < 1930
|
||||||
|
|
||||||
|
constexpr explicit(false) operator T() const noexcept(std::is_nothrow_copy_constructible_v<T>)
|
||||||
|
requires std::copyable<T>
|
||||||
|
{
|
||||||
|
return value_;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
constexpr explicit(false) operator T() const& noexcept(std::is_nothrow_copy_constructible_v<T>)
|
constexpr explicit(false) operator T() const& noexcept(std::is_nothrow_copy_constructible_v<T>)
|
||||||
requires std::copyable<T>
|
requires std::copyable<T>
|
||||||
{
|
{
|
||||||
@@ -72,6 +83,8 @@ public:
|
|||||||
return std::move(value_);
|
return std::move(value_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
constexpr T& value() & noexcept = delete;
|
constexpr T& value() & noexcept = delete;
|
||||||
constexpr const T& value() const& noexcept { return value_; }
|
constexpr const T& value() const& noexcept { return value_; }
|
||||||
constexpr T&& value() && noexcept { return std::move(value_); }
|
constexpr T&& value() && noexcept { return std::move(value_); }
|
||||||
|
Reference in New Issue
Block a user