Update the systems reference generator for the two-axis quantity character and to reduce
the quantities table width:
- The Character column now prints the order with a `complex` prefix only when the field is
complex (`scalar`, `complex scalar`, `vector`, `tensor`, `complex vector`,
`complex tensor`), replacing the old `Real`/`Complex`/`Vector`/`Tensor` labels that mixed
the two axes and could not express complex vectors or tensors.
- The separate `is_kind` and `non_negative` boolean columns are merged into one `Traits`
column that shows `kind` and/or `≥ 0` only when set (blank otherwise), dropping a column
and the per-row ticks.
Regenerated the affected systems reference pages.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The QUANTITY_SPEC parser only recognized `quantity_character::` as a character override,
and the generated metadata-extraction program `switch`ed over the character enum. Both
broke once the ISQ definitions moved to the `quantity_tensor_order` / `quantity_field`
spelling and `quantity_character` became a struct.
- Treat `quantity_tensor_order::` and `quantity_field::` (alongside `quantity_character::`)
as character overrides when deciding whether the third macro argument is an equation.
- Rewrite `character_to_string` to compare against the two-axis values instead of switching
on an enum.
The regenerated reference is byte-identical (only the source hash changes).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The previous `195+` is the Conan-side encoding (matching
`_feature_compatibility` in conanfile.py) and is ambiguous in prose —
the digits collide with `_MSC_VER`/cl-version/toolset variants. The
cl-version `19.5+` is what users see from `cl /version`, and what's
already used in src/CMakeLists.txt when this project talks about MSVC
versions. Realign the MSVC column to accommodate the wider cell.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mp-units' minimum-supported MSVC 195 (VS 2026) has solid `import std;`
support, but enabling `-o import_std=True` against the build hit two
issues that this change fixes.
(1) Module scanning was only enabled when `cxx_modules=True`.
Without `CMAKE_CXX_SCAN_FOR_MODULES=ON`, CMake doesn't link the implicit
std module BMI into non-module translation units that do `import std;`,
producing C2230 "could not find module 'std'". Enable scanning whenever
`import_std=True` as well. Same bug fixed in `test_package/conanfile.py`.
(2) The std module BMI is built with mismatched compile flags.
CMake materializes the implicit std module BMI as `__cmake_cxx_std_NN`,
a separate internal target that does not link mp-units and therefore
does not inherit mp-units' target-level options. On MSVC this caused
C5050 (`_UTF8` defined on consumer but not on module command line) and
on Clang 21 there is a parallel `-Wreserved-module-identifier` issue
already partially handled in `src/CMakeLists.txt` but in a directory
scope that did not actually reach the BMI either.
Consolidate the workarounds into one `src/cmake/import-std-setup.cmake`
snippet that applies the flags project-wide via `add_compile_options`,
self-guarded by `if(NOT CMAKE_CXX_MODULE_STD) return()`. It is included
from every entry point so all delivery paths converge:
- top-level `CMakeLists.txt` for the dev build
- bundled `mp-unitsConfig.cmake` for `find_package` consumers
- via `cmake_build_modules` in `package_info()` for Conan-generated
configs (the `cxx_modules=False` consumer path)
Other pieces:
- `test/static/unit_magnitude_test.cpp` was the only test in the repo
missing the `MP_UNITS_IMPORT_STD` gate around `#include <type_traits>`,
causing duplicate `std::integral_constant` definitions in this
configuration.
- Compiler support table announces MSVC 195+ for `import std;`.
- Installation docs gain a consumer-side setup note covering the
CMake cache variables required, what mp-units handles automatically
via the snippet, and the `add_subdirectory`-vendored caveat.
Verified: `conan build . -pr msvc195 -o '&:cxx_modules=False'
-o '&:import_std=True' -s compiler.cppstd=23 -c
user.mp-units.build:all=True` -> 40/40 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>