Skip to content

Commit

Permalink
test: tests to check if quantity satisfies Scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Dec 1, 2024
1 parent e44bb7e commit db64534
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/static/concepts_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,13 @@ static_assert(detail::Scalar<quantity<one>>);
static_assert(detail::Scalar<quantity<one, int>>);
static_assert(!detail::Scalar<quantity_point<one>>);
static_assert(!detail::Scalar<quantity_point<si::metre>>);
// TODO it would be make the below work
static_assert(!detail::Scalar<quantity<si::metre>>);
static_assert(!detail::Scalar<quantity<isq::speed[si::metre / si::second], int>>);
static_assert(detail::Scalar<quantity<si::metre>>);
static_assert(detail::Scalar<quantity<isq::speed[si::metre / si::second], int>>);
// TODO provide support for the below when quantity specifications expressions are done
// static_assert(detail::Vector<quantity<isq::velocity[si::metre / si::second], int>>);
#if MP_UNITS_HOSTED
// static_assert(detail::Vector<quantity<isq::velocity[si::metre / si::second], cartesian_vector<double>>>);
// static_assert(detail::Complex<quantity<si::volt * si::ampere>, std::complex<double>>);
#endif

} // namespace

0 comments on commit db64534

Please sign in to comment.