Skip to content

Commit 947fbee

Browse files
committed
Merge remote-tracking branch 'upstream/master' into feature/audio-examples
2 parents 936a414 + 6d10a15 commit 947fbee

30 files changed

+827
-126
lines changed

CHANGELOG.md

Lines changed: 135 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ This page documents the version history and changes for the **mp-units** library
66

77
## mp-units
88

9-
### 2.5.0 <small>WIP</small> { id="2.5.0" }
9+
### 2.6.0 <small>TBD</small> { id="2.6.0" }
10+
11+
- (!) feat: `pi` and `π` is now a unit constant
12+
- (!) refactor: `pi` magnitude constant renamed to `pi_c`
13+
14+
### 2.5.0 <small>December 24, 2025</small> { id="2.5.0" }
1015

1116
- (!) feat: representation concepts improved
1217
- (!) feat: `representation_of` concept now also accepts a `quantity_spec` and
@@ -35,11 +40,23 @@ This page documents the version history and changes for the **mp-units** library
3540
- feat: deprecation messages now provide the release version where the
3641
deprecation happened
3742
- feat: electromagnetism.h updated to IEC80000-6-2022
38-
- feat: `ConvertibleWithNumber` introduced to improve convertibility of unit `one`
3943
with raw numbers
4044
- feat: `lerp` and `midpoint` for points added
4145
- feat: `is_value_preserving` customization point added
46+
- feat: `EQUIV{...}` replaced with `[...]` in the text output of common units
47+
- feat: `constexpr_format` added
48+
- feat: `unsatisfied` added and enabled throwing constraints
49+
- feat: some constraints refactored to throw exceptions with nice error messages
50+
- feat: explicit constructor now can perform an explicit `quantity_spec` conversion
51+
- feat: natural units support is now opt-in
52+
- feat: `value_type_t` is now recursive
53+
- feat: support for `root` of negative numbers removed
54+
- feat: old MSVC workarounds disabled for the latest version
55+
- feat: `invoke_with_prefixed` added to SI
56+
- feat: `QuantityLike` should not satisfy the `Representation` concept
4257
- feat(example): `is_vector` specialization no longer needed for `si_constants`
58+
- feat(example): measurement.h extracted for easier reuse
59+
- feat(example): `clcpp_response` and `conversion_factor` examples removed
4360
- (!) refactor: `type_list` moved to implementation details
4461
- (!) refactor: from now `unit_symbol` and `dimension_symbol` always returns
4562
`std::string_view`
@@ -53,6 +70,10 @@ This page documents the version history and changes for the **mp-units** library
5370
- (!) refactor: `scalar` and `complex` characters renamed to `real_scalar` and
5471
`complex_scalar` respectively + concepts refactoring
5572
- (!) refactor: `MagConstant` concept renamed to `detail::is_mag_constant` variable trait
73+
- (!) refactor: `format.h` header file made deprecated
74+
- (!) refactor: `ostream.h` header file made deprecated
75+
- (!) refactor: rename `default_denominator` to `default_solidus` in
76+
`unit_symbol_solidus` enum
5677
- refactor: mp_units.core defined in terms of `core.h`
5778
- refactor: `MP_UNITS_NONCONST_TYPE` introduced to benefit from the C++23 feature
5879
- refactor: `SymbolicConstant` concept refactored
@@ -88,6 +109,19 @@ This page documents the version history and changes for the **mp-units** library
88109
- refactor: `visit_format_arg` is deprecated in C++26
89110
- refactor: deprecated literal operators
90111
- refactor: constraints refactoring
112+
- refactor: compund assignment and pre-/post-increment operators are now lvalue-qualified
113+
member functions
114+
- refactor: `ValuePreservingScaling` concepts renamed
115+
- refactor: `common_type` specializations refactored
116+
- refactor: `NumberLike` renamed to `DimensionlessOne`
117+
- refactor: branching on a deprecated C++ feature improved
118+
- refactor: all CTADs made implicit
119+
- refactor: `MP_UNITS_REMOVE_CONST` gcc workaround added to `RepresentationOf`
120+
- refactor: `ReferenceOf` concept simplified
121+
- refactor: explicitly defaulted special member functions removed
122+
- refactor(example): slight refactoring of examples while working on their documentation
123+
- refactor(example): kalman filter examples refactored to better match their
124+
- refactor(example): `is_hae` function refactored to `HAEAltitude` concept
91125
- (!) fix: `electric_current_phasor`, `voltage_phasor`, `apparent_power` switched to
92126
complex character
93127
- (!) fix: `position_vector` and `displacement` moved to a different place in a tree
@@ -109,16 +143,45 @@ This page documents the version history and changes for the **mp-units** library
109143
- fix: `mag_constant` workarounds branches for clang fixed
110144
- fix: checking for clang versions fixed in CMake scripts
111145
- fix: text stripping in `type_name` fixed
146+
- fix: make quantity conversion to `Rep` `constexpr`
147+
(thanks [@KangarooKoala](https://github.com/KangarooKoala))
148+
- fix: MSVC compilation fixed
149+
- fix: `abs` interface and implementation improved
150+
- fix: unused parameters removed from `scaling_overflows_non_zero_values`
151+
- fix: invalid precondition check in `root` removed
152+
- fix: workaround for fmt
153+
- fix: CTAD issue workaround for MSVC
154+
- fix: `dynamic_spec_id_handler` fixed for gcc-15
155+
- fix: MSVC workarounds for `consteval` functions
156+
- fix: resolve CMake compiler test failure in freestanding CI builds
157+
(thanks [@rothmichaels](https://github.com/rothmichaels))
158+
- fix: msvc empty bases workaround (thanks [@Radnyx](https://github.com/Radnyx))
159+
- fix: seconds literal has unspecified type and depends on implementation
160+
(thanks [@Radnyx](https://github.com/Radnyx))
161+
- fix: `named_unit` can now be created for `kind_of<dimensionless>`
162+
- fix: enable runtime usage of inverse function by using compile-time unit extraction
163+
(thanks [@rothmichaels](https://github.com/rothmichaels))
164+
- fix: CTAD for dimensionless quantities fixed
165+
- fix: concepts tests compilation fixed for `MP_UNITS_API_NATURAL_UNITS` OFF
166+
- fix: missing natural units support added to `package_info()`
167+
- fix: freestanding build error in Conan `package_info()`
168+
(thanks [@kammce](https://github.com/kammce))
169+
- fix: replace `wstring_view` with `basic_string_view<wchar_t>`
170+
(thanks [@kammce](https://github.com/kammce))
171+
- Fix destination unit creation in `inverse`
172+
- fix(docs): typo in a file name fixed
173+
- fix(example): text formatting fixed for `glide_computer` documentation
112174
- test: lots of tests for complex quantities
113175
- test: runtime unit tests refactored to have a bigger granularity (less top level tests)
114176
- test: _surface tension_ replaced with _entropy_ in an fmt test
115177
- test: test_package now is tested also with C++20 modules
116178
- test: tests for dimensionless quantities static data members
117179
- test: a few more natural units tests added
118180
- test: tests to check if `quantity` satisfies `Scalar`
119-
- test: add static tests for concept `DimensionOf` (thanks
120-
[@jvocht](https://github.com/jvocht))
181+
- test: add static tests for concept `DimensionOf` (thanks [@jvocht](https://github.com/jvocht))
121182
- test: quantity character concepts tests for quantities added
183+
- test: duplicated `dimensionless` tests removed
184+
- test: additional concepts tests for quantity spec added
122185
- docs: ISQ part 6 released
123186
- docs: new chapter about our documentation added to the contributing guide
124187
- docs: directory name updated in the contributing guide
@@ -137,6 +200,31 @@ This page documents the version history and changes for the **mp-units** library
137200
- docs: "Concepts" chapter updated
138201
- docs: old customization points removed from the "Character of a Quantity" chapter
139202
- docs: clang-19 issues mentioned in a compiler support table
203+
- docs: "Introducing absolute quantities" blog post added
204+
- docs: relative path removed from the contributing guide
205+
- docs: examples updated and deprecated tags generation replaced with modern usage
206+
- docs: compiler explorer links replaced with buttons
207+
- docs: "Installation and Usage" cleanup
208+
- docs: "Introduction" chapter improved
209+
- docs: "Quick Start" Improved
210+
- docs: "Interface Introduction" improved
211+
- docs: "Systems of Quantities" chapter improved
212+
- docs: "Concepts" chapter improved
213+
- docs: README updated
214+
- docs: "Install as a Dependency" added to README
215+
- docs: tutorials section added
216+
- docs: info about `kind_of<dimensionless>` units added
217+
- docs: adjust formatting in temperature printing function for better alignment
218+
- docs: README visually improved
219+
- docs: 2 new chapters added to README
220+
- docs: link to mp-units in ConanCenter added to README
221+
- docs: "Support the Project" added to README
222+
- docs: enhance testimonials section for clarity and inclusivity
223+
- docs: clarify flowchart labels for quantity addition and differences
224+
- docs: CONTRIBUTORS.md added
225+
- docs: examples reworked
226+
- docs: "Cheat Sheet" added
227+
- docs: "Auto-scaling of a quantity" chapter added
140228
- docs(ref): document most of `mp_units.core` (thanks [@JohelEGP](https://github.com/JohelEGP))
141229
- build: `CheckCacheVarValues` CMake module file added
142230
- build: `MP_UNITS_DEV_TIME_TRACE` CMake option added
@@ -145,13 +233,54 @@ This page documents the version history and changes for the **mp-units** library
145233
- build: clang-20 enabled in CI
146234
- build: clang-19 support removed from conanfile.py
147235
- build: clang-20.1 workaround added to `package_info`
148-
- build: update dependencies to gsl-lite/0.42.0, ms-gsl/4.1.0,
149-
fmt/11.1.4, and catch2/3.8.0
236+
- build: update dependencies to gsl-lite/1.0.1, ms-gsl/4.2.0,
237+
fmt/12.1.0, catch2/3.11.0, cmake/4.2.1
150238
- build: suppress warnings for gcc-12 in conanfile
239+
- build: switch freestanding CI to clang-20
240+
- build: gcc installation step is now mandatory for all gcc versions
241+
- build: `import_std` set to `False` by default
242+
- build: `wg21-linear_algebra` dependency removed
243+
- build: `check_libcxx_in_use` improved
244+
- build: Gitpod support removed
245+
- build: CodeSpaces support added
246+
- build: CMake switched to a new gsl-lite target
247+
- build: clang-21 added to `check_all.sh`
248+
- build: gcc-15 enabled in `check_all.sh`
249+
- build: `explicit_this` enabled for AppleClang 17 and MSVC 19.32
250+
(thanks [@alex-tee](https://github.com/alex-tee))
251+
- build: add `build: add INSTALL option to cmake` option to cmake
252+
(thanks [@alex-tee](https://github.com/alex-tee))
253+
- build: projectPrefix CMake variable removed
254+
- build: `MP_UNITS_BUILD_AS_SYSTEM_HEADERS` removed
255+
- build: `warnings.cmake` refactored to use `CMAKE_COMPILE_WARNING_AS_ERROR`
256+
- build: `CMAKE_COMPILE_WARNING_AS_ERROR` set in conanfile
257+
- build: `PROJECT_IS_TOP_LEVEL` used in `ensure_entry_point`
258+
- build: Various cleanup (thanks [@HazardyKnusperkeks](https://github.com/HazardyKnusperkeks))
259+
- build: CMake config file variables handling fixed
260+
- build: dereferencing CMake variables in `if()` conditions is not needed
261+
- build: improved setting of `MP_UNITS_BUILD_CXX_MODULES` for `test_package`
262+
- build: `MP_UNITS_BUILD_CXX_MODULES` will now be always provided by Conan
263+
- build: CMake CI should run the cmake executable provided by Conan
264+
- build: C++23 enabled for `test_package` when `import std` is ON
265+
- build: all `target_compile_definitions` aggregated in one place
151266
- ci: CI matrix generation added (thanks [@burnpanck](https://github.com/burnpanck))
152267
- ci: `import_std` now checks if at least C++23 is being used
268+
- ci: GitHub actions improved
269+
- ci: dependency review GitHub action added
270+
- ci: clang-21 support added
271+
- ci: update dependency review configuration
272+
- ci: housekeeping after release step fixed in ci-conan
273+
- ci: the macOS-13 based runner images are retired in GitHub
274+
- ci: old 'VISUAL' decendant of Conan 1.x removed from CMake CI
153275
- perf: caching of the results of heavy `consteval` functions execution added
154276
- perf: `expr_projectable` concept removed to improve compilation performance
277+
- style: pre-commit tools updated
278+
- style: markdownlint rules updated
279+
- style: MD036 added to .markdownlint.json
280+
- chore: add issue templates for bug reports, documentation issues, and feature requests
281+
- chore: add usage experience issue template and a chapter in README
282+
- chore: PR template added
283+
- chore: FUNDING.yml file added
155284

156285
### 2.4.0 <small>November 5, 2024</small> { id="2.4.0" }
157286

CITATION.cff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ repository-code: "https://github.com/mpusz/mp-units"
4040
url: "https://mpusz.github.io/mp-units"
4141
repository-artifact: "https://conan.io/center/mp-units"
4242

43-
version: 2.4.0
44-
date-released: "2024-11-05"
43+
version: 2.5.0
44+
date-released: "2025-12-24"
4545
identifiers:
46-
- description: "The GitHub release URL of tag 2.4.0"
46+
- description: "The GitHub release URL of tag 2.5.0"
4747
type: url
48-
value: "https://github.com/mpusz/mp-units/releases/tag/v2.4.0"
48+
value: "https://github.com/mpusz/mp-units/releases/tag/v2.5.0"

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ For more, see the [official documentation](https://mpusz.github.io/mp-units) and
140140
In case you would like to upload **mp-units** package to the Conan server, do the following:
141141

142142
```shell
143-
conan upload -r <remote-name> --all mp-units/2.4.0@<user>/<channel>
143+
conan upload -r <remote-name> --all mp-units/2.5.0@<user>/<channel>
144144
```
145145

146146

conanfile.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def build_requirements(self):
217217
self.tool_requires("cmake/[>=4.2.1 <5]")
218218
if self._build_all:
219219
if not self.options.freestanding:
220-
self.test_requires("catch2/3.10.0")
220+
self.test_requires("catch2/3.11.0")
221221

222222
def validate(self):
223223
compiler = self.settings.compiler
@@ -227,7 +227,8 @@ def validate(self):
227227
)
228228
if compiler == "apple-clang" and Version(compiler.version).major == 17:
229229
raise ConanInvalidConfiguration(
230-
"apple-clang-17 (Xcode 16.3+) does not build mp-units because it has the same unfixable bug as clang-19."
230+
"apple-clang-17 (Xcode 16.3+) does not build mp-units "
231+
+ "because it has the same unfixable bug as clang-19."
231232
)
232233

233234
self._check_feature_supported("mp-units", "minimum_support")
@@ -258,6 +259,7 @@ def generate(self):
258259
tc.absolute_paths = True # only needed for CMake CI
259260
if self._build_all:
260261
tc.cache_variables["CMAKE_EXPORT_COMPILE_COMMANDS"] = True
262+
tc.cache_variables["CMAKE_COMPILE_WARNING_AS_ERROR"] = True
261263
tc.cache_variables["CMAKE_VERIFY_INTERFACE_HEADER_SETS"] = (
262264
not opt.import_std
263265
)

0 commit comments

Comments
 (0)