mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-29 18:07:16 +02:00
refactor: representation concepts refactored + some quantities switched to complex
This commit is contained in:
@ -37,9 +37,10 @@ import std;
|
||||
|
||||
#if MP_UNITS_HOSTED
|
||||
template<typename T>
|
||||
constexpr bool mp_units::is_scalar<std::complex<T>> = true;
|
||||
constexpr bool mp_units::is_complex<std::complex<T>> = true;
|
||||
#endif
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace mp_units;
|
||||
@ -268,7 +269,9 @@ static_assert(Representation<double>);
|
||||
static_assert(!Representation<bool>);
|
||||
static_assert(!Representation<std::optional<int>>);
|
||||
#if MP_UNITS_HOSTED
|
||||
static_assert(Representation<std::complex<float>>);
|
||||
static_assert(Representation<std::complex<double>>);
|
||||
static_assert(Representation<std::complex<long double>>);
|
||||
static_assert(!Representation<std::string>);
|
||||
static_assert(!Representation<std::chrono::seconds>);
|
||||
#endif
|
||||
@ -279,7 +282,7 @@ static_assert(RepresentationOf<double, quantity_character::scalar>);
|
||||
static_assert(!RepresentationOf<bool, quantity_character::scalar>);
|
||||
static_assert(!RepresentationOf<std::optional<int>, quantity_character::scalar>);
|
||||
#if MP_UNITS_HOSTED
|
||||
static_assert(RepresentationOf<std::complex<double>, quantity_character::scalar>);
|
||||
static_assert(RepresentationOf<std::complex<double>, quantity_character::complex>);
|
||||
static_assert(!RepresentationOf<std::chrono::seconds, quantity_character::scalar>);
|
||||
static_assert(!RepresentationOf<std::string, quantity_character::scalar>);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user