mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-30 18:37:15 +02:00
my_value
compilation fixed
This commit is contained in:
@ -54,10 +54,6 @@ namespace {
|
|||||||
constexpr operator const T&() const & { return value_; }
|
constexpr operator const T&() const & { return value_; }
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(units::Scalar<my_value<float>>);
|
|
||||||
static_assert(std::convertible_to<my_value<float>, float>);
|
|
||||||
static_assert(std::convertible_to<float, my_value<float>>);
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
namespace units {
|
namespace units {
|
||||||
@ -92,6 +88,10 @@ namespace std {
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
static_assert(units::Scalar<my_value<float>>);
|
||||||
|
static_assert(std::convertible_to<my_value<float>, float>);
|
||||||
|
static_assert(std::convertible_to<float, my_value<float>>);
|
||||||
|
|
||||||
using namespace units;
|
using namespace units;
|
||||||
|
|
||||||
// class invariants
|
// class invariants
|
||||||
|
Reference in New Issue
Block a user