IAP GITLAB

Skip to content
Snippets Groups Projects
Commit b98289ee authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

is_quantity<> utility

parent c510dbf4
No related branches found
No related tags found
1 merge request!100Resolve "Low energy hadronic interactions: UrQMD interface"
...@@ -473,6 +473,16 @@ namespace phys { ...@@ -473,6 +473,16 @@ namespace phys {
friend constexpr bool operator>=(quantity<D, X> const& x, quantity<D, Y> const& y); friend constexpr bool operator>=(quantity<D, X> const& x, quantity<D, Y> const& y);
}; };
// helper to check whether some type is a quantity
template <typename TNonQuantityType>
struct is_quantity : std::false_type {};
template <typename Dims, typename T>
struct is_quantity<quantity<Dims, T>> : std::true_type {};
template <typename T>
constexpr bool is_quantity_v = is_quantity<T>::value;
// Give names to the seven fundamental dimensions of physical reality. // Give names to the seven fundamental dimensions of physical reality.
typedef dimensions<1, 0, 0, 0, 0, 0, 0, 0> length_d; typedef dimensions<1, 0, 0, 0, 0, 0, 0, 0> length_d;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment