From 704ce15f195985feb90cb17803481363e767e7d6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 14:47:13 +0000 Subject: [PATCH] Deployed 87bf5b3 to main with MkDocs 1.5.3 and mike 1.1.2 --- main/au.hh | 140 +++++- main/au_all_units.hh | 924 +++++++++++++++++++++---------------- main/au_all_units_noio.hh | 936 ++++++++++++++++++++++---------------- main/au_noio.hh | 140 +++++- main/sitemap.xml | 92 ++-- main/sitemap.xml.gz | Bin 593 -> 594 bytes 6 files changed, 1376 insertions(+), 856 deletions(-) diff --git a/main/au.hh b/main/au.hh index 01a96b39..0bd62956 100644 --- a/main/au.hh +++ b/main/au.hh @@ -24,7 +24,7 @@ #include #include -// Version identifier: 0.3.4-5-gffea274 +// Version identifier: 0.3.4-6-g87bf5b3 // support: INCLUDED // List of included units: // amperes @@ -651,6 +651,136 @@ struct identity { } // namespace stdx } // namespace au + + +namespace au { + +// +// A type trait that determines if a type is a valid representation type for `Quantity` or +// `QuantityPoint`. +// +template +struct IsValidRep; + +// +// A type trait to indicate whether the product of two types is a valid rep. +// +// Will validly return `false` if the product does not exist. +// +template +struct IsProductValidRep; + +// +// A type trait to indicate whether the quotient of two types is a valid rep. +// +// Will validly return `false` if the quotient does not exist. +// +template +struct IsQuotientValidRep; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Implementation details below. +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// Forward declarations for main Au container types. +template +class Quantity; +template +class QuantityPoint; +template +struct CorrespondingQuantity; + +namespace detail { +template +struct IsAuType : std::false_type {}; + +template +struct IsAuType<::au::Quantity> : std::true_type {}; + +template +struct IsAuType<::au::QuantityPoint> : std::true_type {}; + +template +using CorrespondingUnit = typename CorrespondingQuantity::Unit; + +template +using CorrespondingRep = typename CorrespondingQuantity::Rep; + +template +struct HasCorrespondingQuantity + : stdx::conjunction, + stdx::experimental::is_detected> {}; + +template +using LooksLikeAuOrOtherQuantity = stdx::disjunction, HasCorrespondingQuantity>; + +// We need a way to form an "operation on non-quantity types only". That is: it's some operation, +// but _if either input is a quantity_, then we _don't even form the type_. +// +// The reason this very specific machinery lives in `rep.hh` is because when we're dealing with +// operations on "types that might be a rep", we know we can exclude quantity types right away. +// (Note that we're using the term "quantity" in an expansive sense, which includes not just +// `au::Quantity`, but also `au::QuantityPoint`, and "quantity-like" types from other libraries +// (which we consider as "anything that has a `CorrespondingQuantity`". +template