diff --git a/.gitignore b/.gitignore index d0a116be..2699986c 100644 --- a/.gitignore +++ b/.gitignore @@ -49,4 +49,4 @@ CMakeUserPresets.json # cxxdraft-htmlgen docs/api_reference/src/source/ -docs/api_reference/gen/ +docs/api_reference/gen diff --git a/.gitpod/Dockerfile b/.gitpod/Dockerfile index cb1c901e..c26d34d2 100644 --- a/.gitpod/Dockerfile +++ b/.gitpod/Dockerfile @@ -17,3 +17,18 @@ RUN sudo install-packages \ libjpeg-dev \ libpng-dev \ libz-dev + +# Install API reference dependencies +RUN sudo install-packages \ + haskell-stack \ + graphviz \ + nodejs \ + npm \ + ghc \ + cabal-install +RUN npm install split mathjax-full mathjax-node-sre +RUN cabal update + +# Install MathJax-Node-CLI +git clone https://github.com/mathjax/mathjax-node-cli --depth=1 +echo "export PATH=\"$PWD/mathjax-node-cli/bin:\$PATH\"" >> ~/.bashrc diff --git a/src/core/include/mp-units/framework/quantity.h b/src/core/include/mp-units/framework/quantity.h index fd495039..b2280ef0 100644 --- a/src/core/include/mp-units/framework/quantity.h +++ b/src/core/include/mp-units/framework/quantity.h @@ -314,25 +314,13 @@ public: convert_explicitly> || !std::convertible_to::rep>) constexpr // NOLINTNEXTLINE(google-explicit-constructor, hicpp-explicit-conversions) - operator Q_() const& noexcept( - noexcept(quantity_like_traits::from_numerical_value(numerical_value_is_an_implementation_detail_)) && - std::is_nothrow_copy_constructible_v) + operator Q_() const + noexcept(noexcept(quantity_like_traits::from_numerical_value(numerical_value_is_an_implementation_detail_)) && + std::is_nothrow_copy_constructible_v) { - return quantity_like_traits::from_numerical_value(numerical_value_is_an_implementation_detail_).value; - } - - template> - requires detail::QuantityConvertibleTo> - [[nodiscard]] explicit(is_specialization_of::from_numerical_value( - numerical_value_is_an_implementation_detail_)), - convert_explicitly> || - !std::convertible_to::rep>) constexpr - // NOLINTNEXTLINE(google-explicit-constructor, hicpp-explicit-conversions) - operator Q_() && noexcept( - noexcept(quantity_like_traits::from_numerical_value(numerical_value_is_an_implementation_detail_)) && - std::is_nothrow_move_constructible_v) - { - return quantity_like_traits::from_numerical_value(std::move(numerical_value_is_an_implementation_detail_)).value; + return quantity_like_traits::from_numerical_value( + numerical_value_in(get_unit(quantity_like_traits::reference))) + .value; } // member unary operators