// The MIT License (MIT) // // Copyright (c) 2018 Mateusz Pusz // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "units/isq/si/cgs/speed.h" #include "units/isq/si/speed.h" #include "units/isq/si/fps/speed.h" #include "units/quantity_point.h" #include "units/chrono.h" #include #include #include #include #include namespace { using namespace units; using namespace units::isq; // Prefix family static_assert(PrefixFamily); static_assert(!PrefixFamily); // Prefix static_assert(Prefix); static_assert(!Prefix); static_assert(!Prefix); // UnitRatio static_assert(UnitRatio); static_assert(!UnitRatio); // static_assert(UnitRatio); // static_assert in ratio static_assert(UnitRatio); static_assert(!UnitRatio); static_assert(!UnitRatio); // BaseDimension static_assert(BaseDimension); static_assert(!BaseDimension); static_assert(!BaseDimension); // DerivedDimension static_assert(DerivedDimension); static_assert(!DerivedDimension); static_assert(!DerivedDimension); // Dimension static_assert(Dimension); static_assert(Dimension); static_assert(!Dimension); static_assert(!Dimension); static_assert(!Dimension); // Unit static_assert(Unit); static_assert(Unit); static_assert(Unit); static_assert(Unit); static_assert(!Unit); static_assert(!Unit); static_assert(!Unit); // UnitOf static_assert(UnitOf); static_assert(UnitOf); static_assert(UnitOf); static_assert(!UnitOf); // QuantityValue static_assert(QuantityValue); static_assert(QuantityValue>); static_assert(!QuantityValue>); static_assert(!QuantityValue>>); static_assert(!QuantityValue); static_assert(!QuantityValue); // Quantity static_assert(Quantity>); static_assert(!Quantity); static_assert(!Quantity>); // QuantityPoint static_assert(QuantityPoint>); static_assert(!QuantityPoint>); static_assert(!QuantityPoint); // QuantityLike static_assert(QuantityLike); static_assert(QuantityLike); static_assert(!QuantityLike>); static_assert(!QuantityLike); // WrappedQuantity static_assert(wrapped_quantity_>>); static_assert(!wrapped_quantity_, si::length>>); // QuantityOf static_assert(QuantityOf, si::dim_length>); // TODO it seems `QuantityOf` is a bad name if `si::cgs::length` matches `si::fps::dim_length` static_assert(QuantityOf, si::dim_length>); static_assert(QuantityOf, si::dim_length>); static_assert(QuantityOf, si::fps::dim_length>); static_assert(!QuantityOf, si::dim_time>); } // namespace