mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 04:44:27 +02:00
feat: add module mp_units
This commit is contained in:
committed by
Mateusz Pusz
parent
f3ad392123
commit
7cb2099af5
@@ -25,7 +25,12 @@ cmake_minimum_required(VERSION 3.5)
|
||||
find_package(Catch2 3 CONFIG REQUIRED)
|
||||
|
||||
add_executable(unit_tests_runtime distribution_test.cpp fmt_test.cpp math_test.cpp)
|
||||
target_link_libraries(unit_tests_runtime PRIVATE mp-units::mp-units Catch2::Catch2WithMain)
|
||||
if(TARGET mp-units::modules)
|
||||
target_link_libraries(unit_tests_runtime PRIVATE mp-units::modules)
|
||||
else()
|
||||
target_link_libraries(unit_tests_runtime PRIVATE mp-units::mp-units)
|
||||
endif()
|
||||
target_link_libraries(unit_tests_runtime PRIVATE Catch2::Catch2WithMain)
|
||||
|
||||
if(${projectPrefix}BUILD_LA)
|
||||
find_package(wg21_linear_algebra CONFIG REQUIRED)
|
||||
|
@@ -21,9 +21,14 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include <catch2/matchers/catch_matchers_templated.hpp>
|
||||
#include <mp-units/bits/fmt_hacks.h>
|
||||
#include <algorithm>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/format.h>
|
||||
#include <mp-units/quantity.h>
|
||||
#include <algorithm>
|
||||
#endif
|
||||
|
||||
namespace mp_units {
|
||||
|
||||
|
@@ -21,14 +21,18 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <mp-units/ostream.h>
|
||||
#include <mp-units/random.h>
|
||||
#include <mp-units/systems/si/unit_symbols.h>
|
||||
#include <mp-units/systems/si/units.h>
|
||||
#include <array>
|
||||
#include <initializer_list>
|
||||
#include <random>
|
||||
#include <vector>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/ostream.h>
|
||||
#include <mp-units/random.h>
|
||||
#include <mp-units/systems/si/unit_symbols.h>
|
||||
#include <mp-units/systems/si/units.h>
|
||||
#endif
|
||||
|
||||
|
||||
using namespace mp_units;
|
||||
|
@@ -22,6 +22,13 @@
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/matchers/catch_matchers_exception.hpp>
|
||||
#include <mp-units/bits/fmt_hacks.h>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <locale>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/customization_points.h>
|
||||
#include <mp-units/format.h>
|
||||
#include <mp-units/ostream.h>
|
||||
@@ -29,9 +36,7 @@
|
||||
#include <mp-units/systems/isq/mechanics.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <locale>
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
requires mp_units::is_scalar<T>
|
||||
|
@@ -21,6 +21,12 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <mp-units/bits/fmt_hacks.h>
|
||||
#include <cmath>
|
||||
#include <matrix>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/customization_points.h>
|
||||
#include <mp-units/format.h>
|
||||
#include <mp-units/math.h>
|
||||
@@ -28,8 +34,7 @@
|
||||
#include <mp-units/systems/isq/mechanics.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <cmath>
|
||||
#include <matrix>
|
||||
#endif
|
||||
|
||||
template<typename Rep = double>
|
||||
using vector = STD_LA::fixed_size_column_vector<Rep, 3>;
|
||||
|
@@ -22,13 +22,17 @@
|
||||
|
||||
#include "almost_equals.h"
|
||||
#include <catch2/catch_all.hpp>
|
||||
#include <limits>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/math.h>
|
||||
#include <mp-units/ostream.h>
|
||||
#include <mp-units/systems/angular/angular.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <mp-units/systems/si/unit_symbols.h>
|
||||
#include <mp-units/systems/si/units.h>
|
||||
#include <limits>
|
||||
#endif
|
||||
|
||||
using namespace mp_units;
|
||||
using namespace mp_units::si::unit_symbols;
|
||||
|
@@ -23,7 +23,11 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
add_library(unit_tests_static_truncating quantity_test.cpp)
|
||||
target_link_libraries(unit_tests_static_truncating PRIVATE mp-units::mp-units)
|
||||
if(TARGET mp-units::modules)
|
||||
target_link_libraries(unit_tests_static_truncating PRIVATE mp-units::modules)
|
||||
else()
|
||||
target_link_libraries(unit_tests_static_truncating PRIVATE mp-units::mp-units)
|
||||
endif()
|
||||
target_compile_options(
|
||||
unit_tests_static_truncating PRIVATE $<IF:$<CXX_COMPILER_ID:MSVC>,/wd4242 /wd4244,-Wno-conversion>
|
||||
)
|
||||
@@ -64,5 +68,9 @@ add_library(
|
||||
usc_test.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(unit_tests_static PRIVATE mp-units::mp-units)
|
||||
target_link_libraries(unit_tests_static PRIVATE unit_tests_static_truncating mp-units::mp-units)
|
||||
if(TARGET mp-units::modules)
|
||||
target_link_libraries(unit_tests_static PRIVATE mp-units::modules)
|
||||
else()
|
||||
target_link_libraries(unit_tests_static PRIVATE mp-units::mp-units)
|
||||
endif()
|
||||
target_link_libraries(unit_tests_static PRIVATE unit_tests_static_truncating)
|
||||
|
@@ -20,8 +20,12 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <mp-units/systems/isq_angle/isq_angle.h>
|
||||
#include <numbers>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/systems/isq_angle/isq_angle.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -21,10 +21,14 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "test_tools.h"
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/systems/cgs/cgs.h>
|
||||
#include <mp-units/systems/isq/mechanics.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <mp-units/systems/si/unit_symbols.h>
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
requires mp_units::is_scalar<T>
|
||||
|
@@ -21,11 +21,16 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "test_tools.h"
|
||||
#include <ratio>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
#include <chrono>
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/bits/external/type_traits.h>
|
||||
#include <mp-units/chrono.h>
|
||||
#include <mp-units/quantity_point.h>
|
||||
#include <mp-units/systems/si/unit_symbols.h>
|
||||
#include <ratio>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,8 +20,12 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/compare.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,16 +20,20 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <chrono>
|
||||
#include <complex>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/chrono.h>
|
||||
#include <mp-units/concepts.h>
|
||||
#include <mp-units/quantity_point.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <mp-units/systems/natural/natural.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <chrono>
|
||||
#include <complex>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
inline constexpr bool mp_units::is_scalar<std::complex<T>> = true;
|
||||
|
@@ -20,11 +20,15 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <ostream>
|
||||
#include <type_traits>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <units/generic/dimensionless.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <ostream>
|
||||
#include <type_traits>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,8 +20,14 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <mp-units/systems/si/units.h>
|
||||
#include <mp-units/bits/external/hacks.h>
|
||||
#include <concepts>
|
||||
#include <type_traits>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/systems/si/units.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -21,11 +21,15 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "test_tools.h"
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/dimension.h>
|
||||
#include <mp-units/quantity.h>
|
||||
#include <mp-units/quantity_spec.h>
|
||||
#include <mp-units/reference.h>
|
||||
#include <mp-units/unit.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,7 +20,11 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/bits/external/fixed_string.h>
|
||||
#endif
|
||||
|
||||
using namespace mp_units;
|
||||
|
||||
|
@@ -20,9 +20,14 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <mp-units/quantity_spec_macro.h>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/math.h>
|
||||
#include <mp-units/systems/isq/electromagnetism.h>
|
||||
#include <mp-units/systems/si/units.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,10 +20,14 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/systems/hep/hep.h>
|
||||
#include <mp-units/systems/isq/mechanics.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
requires mp_units::is_scalar<T>
|
||||
|
@@ -20,9 +20,13 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/math.h>
|
||||
#include <mp-units/systems/iau/iau.h>
|
||||
#include <mp-units/systems/si/unit_symbols.h>
|
||||
#endif
|
||||
|
||||
/* ************** DERIVED DIMENSIONS THAT INCLUDE UNITS WITH SPECIAL NAMES **************** */
|
||||
|
||||
|
@@ -20,10 +20,14 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/quantity.h>
|
||||
#include <mp-units/reference.h>
|
||||
#include <mp-units/systems/iec80000/iec80000.h>
|
||||
#include <mp-units/systems/si/unit_symbols.h>
|
||||
#endif
|
||||
|
||||
/* ************** DERIVED DIMENSIONS THAT INCLUDE UNITS WITH SPECIAL NAMES **************** */
|
||||
|
||||
|
@@ -20,9 +20,13 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/systems/imperial/imperial.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <mp-units/systems/si/unit_symbols.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,12 +20,16 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/math.h>
|
||||
#include <mp-units/systems/international/international.h>
|
||||
#include <mp-units/systems/isq/mechanics.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <mp-units/systems/si/constants.h>
|
||||
#include <mp-units/systems/si/units.h>
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
requires mp_units::is_scalar<T>
|
||||
|
@@ -20,8 +20,12 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/systems/isq_angle/isq_angle.h>
|
||||
#include <mp-units/systems/si/unit_symbols.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,9 +20,13 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/reference.h>
|
||||
#include <mp-units/systems/isq/isq.h>
|
||||
#include <mp-units/systems/si/unit_symbols.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,9 +20,13 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <units/bits/magnitude.h>
|
||||
#include <units/bits/ratio.h>
|
||||
#include <type_traits>
|
||||
#endif
|
||||
|
||||
using namespace units;
|
||||
using namespace units::detail;
|
||||
|
@@ -20,11 +20,15 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <optional>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/math.h> // IWYU pragma: keep
|
||||
#include <mp-units/systems/international/international.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <mp-units/systems/si/unit_symbols.h>
|
||||
#include <optional>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,8 +20,12 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/math.h>
|
||||
#include <mp-units/systems/natural/natural.h>
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
requires mp_units::is_scalar<T>
|
||||
|
@@ -20,9 +20,13 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <mp-units/bits/external/prime.h>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/bits/external/prime.h>
|
||||
#endif
|
||||
|
||||
using namespace mp_units::detail;
|
||||
|
||||
|
@@ -21,14 +21,19 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "test_tools.h"
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
#include <chrono>
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/chrono.h>
|
||||
#include <mp-units/quantity_point.h>
|
||||
#include <mp-units/systems/isq/isq.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/usc/usc.h>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -21,10 +21,14 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "test_tools.h"
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/quantity.h>
|
||||
#include <mp-units/quantity_spec.h>
|
||||
#include <mp-units/reference.h>
|
||||
#include <mp-units/unit.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -21,12 +21,17 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "test_tools.h"
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
#include <chrono>
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/chrono.h>
|
||||
#include <mp-units/systems/isq/mechanics.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
#endif
|
||||
|
||||
template<>
|
||||
inline constexpr bool mp_units::is_vector<int> = true;
|
||||
|
@@ -20,7 +20,11 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/bits/ratio.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -21,6 +21,9 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "test_tools.h"
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/dimension.h>
|
||||
#include <mp-units/quantity.h>
|
||||
#include <mp-units/quantity_spec.h>
|
||||
@@ -28,6 +31,7 @@
|
||||
#include <mp-units/system_reference.h>
|
||||
#include <mp-units/systems/si/prefixes.h>
|
||||
#include <mp-units/unit.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,8 +20,13 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <type_traits>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/math.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,7 +20,11 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/bits/symbol_text.h>
|
||||
#endif
|
||||
|
||||
using namespace mp_units;
|
||||
|
||||
|
@@ -22,8 +22,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <mp-units/quantity_spec.h>
|
||||
#include <type_traits>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
#include <mp-units/quantity_spec_macro.h>
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/quantity_spec.h>
|
||||
#endif
|
||||
|
||||
template<auto V, typename T>
|
||||
inline constexpr bool is_of_type = std::is_same_v<std::remove_cvref_t<decltype(V)>, T>;
|
||||
|
@@ -20,8 +20,13 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <type_traits>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/bits/external/type_list.h>
|
||||
#include <mp-units/bits/external/type_traits.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,9 +20,13 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/systems/international/international.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <mp-units/systems/typographic/typographic.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,9 +20,13 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/systems/iau/iau.h>
|
||||
#include <mp-units/systems/iec80000/iec80000.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -21,11 +21,15 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "test_tools.h"
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/dimension.h>
|
||||
#include <mp-units/quantity.h>
|
||||
#include <mp-units/reference.h>
|
||||
#include <mp-units/systems/si/prefixes.h>
|
||||
#include <mp-units/unit.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,10 +20,15 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <mp-units/bits/external/hacks.h>
|
||||
#ifdef MP_UNITS_MODULES
|
||||
import mp_units;
|
||||
#else
|
||||
#include <mp-units/systems/isq/mechanics.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <mp-units/systems/si/unit_symbols.h>
|
||||
#include <mp-units/systems/usc/usc.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
Reference in New Issue
Block a user