Release Notes¶
mp-units¶
2.1.0 WIP¶
2.0.0 September 24, 2023¶
units
namespace renamed tomp_units
(#317)- header files in the
<mp-units/...>
rather then in<units/...>
(#317) - the downcasting facility is removed (#383, #211, #32)
- unified and simplified quantity creation (#274)
- determining the best way to create a quantity (#413)
- V2
quantity_point
(#414) - introduction of
quantity_spec
to store not onlydimension
but also additional information about quantities (#405) quantity
now takesreference
object, which aggregatesquantity_spec
and aunit
and arepresentation
type- units, prefixes, dimensions, quantity specifications, and references are passed as NTTPs to templates and provide arithmetic operations and comparison
- expression templates consistently used in all derived types to increase the readability (#351, #166)
- derived dimensions are now factors of only base dimensions (#281)
- convertibility of derived quantities (#427)
- dimensions, quantity specifications, units, and references are now composable, significantly reducing the number of definitions and resulting types
- heavily simplified unit systems definitions (no need to define unnamed derived units, systems-specific dimensions, aliases for quantities, concepts, UDLs, ... anymore)
- improved definition of all systems
- support for ISO 80000 Part 3-6 quantities
- faster than lightspeed constants (#169)
- extensions to quantity formatting with
fmt
quantity_kind
removed- improved casting of unit with
.in(Unit)
,.force_in(Unit)
forquantity
andquantity_spec
- numerical value accessor safety improved with
.numerical_value_in(Unit)
and.force_numerical_value_in(Unit)
quantity
can no longer be constructed with a raw value (#434)- Implicit construction of quantities from a value (#410)
quantity_point
can no longer be constructed with just aquantity
and an explicitPointOrigin
is always neededceil
andfloor
are dangerous (#432)- quecto, ronto, ronna, quetta new SI prefixes support
- comparison against zero added (#487)
- documentation rewritten from scratch
- many smaller changes not possible to address with the previous design (#205, #210, #134)
0.8.0 June 14, 2023¶
- (!) refactor:
common_quantity
,common_quantity_for
,common_quantity_point
,common_quantity_kind
, andcommon_quantity_point_kind
removed - (!) refactor:
named_derived_unit
removed as it was not used - (!) refactor:
derived_unit
renamed toderived_scaled_unit
- (!) refactor:
unit
renamed toderived_unit
- (!) refactor:
U::is_named
removed from the unit types and replaced withNamedUnit
concept - (!) refactor:
PrefixFamily
support removed - (!) refactor:
mi(naut)
renamed tonmi
- (!) refactor:
knot
unit helper renamed tokn
in FPS - (!) refactor:
knot
text symbol changed from"knot"
to"kn"
- refactor:
quantity
op+()
andop-()
reimplemented in terms ofreference
rather thenquantity
types - refactor(example):
glide_computer
now use dimensionless quantities withranged_representation
asrep
- feat: HEP system support added (thanks @RalphSteinhagen)
- feat:
floor()
,ceil()
, andround()
support added (thanks @hofbi) - feat:
std::format
support for compliant compilers added - feat: conversion helpers from
mp-units
tostd::chrono
types added - feat: math functions can now be safely used with user-defined types
- feat: conversion from
quantity_point
tostd::chrono::time_point
added - feat:
nautical_mile_per_hour
andknot
added tosi::international
system - (!) fix: add
quantity_point::origin
, likestd::chrono::time_point::clock
- fix: enable any prefixes for most of the named units (beside those that use prefixes already)
- fix:
hectare
definition fixed to be a prefixed version ofare
+ other units - fix: account for different dimensions in
quantity_point_cast
's constraint - fix: output stream operator now properly handles state
- fix:
fmt
algorithms were overconstrained withforward_iterator
- fix: CTAD for aliases fixed
- fix:
derived_ratio
calculation - fix:
fill_t
assignment operator fixed - fix: improve downcast mode off
- fix:
radioactivity
header compilation fixed - fix:
si::hep::dim_momentum
duplicated definition fixed - fix:
fps
can now coexist withinternational
system - fix: public headers fixed to be standalone
- test: standalone public headers tests added
- (!) build: CMake generator in Conan is no longer obtained from an environment variable
- (!) build: Required Conan version bumped to 1.48
- (!) build: Conan 1.48 does not set
CMAKE_BUILD_TYPE
in theconan_toolchain.cmake
anymore - build: AppleClang 13 support added (thanks @fdischner)
- build: most of the
conanfile.py
refactored to be Conan 2.0 ready - build:
validate()
replaced withconfigure()
to raise errors duringconan install
in Conan 1.X - build: minimum Conan version changed to 1.40
- build:
linear-algebra
Conan repo is no needed anymore - build: Gitpod support added
- build: clang-format-15 support added
- build: export config to local build (#322)
- build: fix export name of
mp-units-system
- build: fmt updated to 8.0.1
- build: gsl-lite updated to 0.40.0
- build: catch2 updated to 2.13.9
- build: doxygen updated to 1.9.4
- build: linear_algebra/0.7.0 switched to wg21-linear_algebra/0.7.2
- ci: VS2022, gcc-11, clang-13, clang-14, and AppleClang 13 support added
- ci: pre-commit support added (thanks @hofbi)
- docs: Project documentation updated
- docs:
CITATION.cff
file added - docs:
CONTRIBUTING.md
updated
0.7.0 May 11, 2021¶
- (!) refactor:
ScalableNumber
renamed toRepresentation
- (!) refactor: output stream operators moved to the
units/quantity_io.h
header file - (!) refactor: Refactored the library file tree
- (!) refactor:
quantity::count()
renamed toquantity::number()
- (!) refactor:
data
system renamed toisq::iec80000
(quantity names renamed too) - (!) refactor:
*deduced_unit
renamed to*derived_unit
- (!) refactor: got rid of a
noble_derived_unit
- refactor: quantity (kind) point updated to reflect latest changes to
quantity
- refactor: basic concepts,
quantity
andquantity_cast
refactored - refactor:
abs()
definition refactored to be more explicit about the return type - feat: quantity (point) kind support added (thanks @johelegp)
- feat: quantity references support added (thanks @johelegp)
- feat: quantity aliases support addded
- feat: interoperability with
std::chrono::duration
and other units libraries - feat: CTAD for dimensionless quantity added
- feat:
modulation_rate
support added (thanks @go2sh) - feat: SI prefixes for
isq::iec80000
support added (thanks @go2sh) - feat: a possibility to disable quantity UDLs support with
UNITS_NO_LITERALS
preprocessor define - feat: a support to define ISQ derived dimensions in terms of different number or order of components
- perf: preconditions check do not influence the runtime performance of a Release build
- perf:
quantity_cast()
generates less assembly instructions - perf: temporary string creation removed from
quantity::op<<()
- perf: value initialization for quantity value removed (left with a default initialization)
- perf: limited the
equivalent
trait usage - perf: limited the C++ Standard Library headers usage
- perf: rvalue references support added for constructors and getters
- (!) fix:
exp()
has sense only for dimensionless quantities - (!) fix:
dim_torque
now properly divides by an angle (instead of multiply) + default unit name change - fix: quantity's operators fixed to behave like the underlying types do
- fix:
quantity_cast()
fixed to work correctly with representation types not convertible fromstd::intmax_t
- fix: ambiguous case for empty type list resolved
- fix: downcasting facility for non-default-constructible types
- fix: restore user-warnings within the library implementation
- fix: the text symbol of
foot_pound_force
andfoot_pound_force_per_second
- fix: quantity modulo arithmetics fixed
- (!) build: Conan testing version is now hosted on Artifactory
- (!) build: Linear Algebra is now hosted on its Artifactory
- (!) build:
BUILD_DOCS
CMake option renamed toUNITS_BUILD_DOCS
- build: doxygen updated to 1.8.20
- build: catch2 updated to 2.13.4
- build: fmt updated to 7.1.3
- build: ms-gsl replaced with gsl-lite/0.38.0
- build: Conan generator switched to
cmake_find_package_multi
- build: Conan CMakeToolchain support added
- build: CMake scripts cleanup
- build: ccache support added
- ci: CI switched from Travis CI to GitHub Actions
0.6.0 September 13, 2020¶
- feat:
quantity_point
support added (thanks @johelegp) - feat: Added angle as SI base dimension (thanks @kwikius)
- feat:
si::angular_velocity
support added (thanks @mikeford3) - feat: FPS system added (thanks @mikeford3)
- feat: Added support for mathematical function
exp(quantity)
- feat: Localization support for text output added (thanks @rbrugo)
- feat: Added STL random number distribution wrappers (thanks @yasamoka)
- (!) refactor: Refactored and cleaned up the library file tree
- (!) refactor:
q_*
UDL renamed to_q_*
- (!) refactor: UDLs with "per" in name renamed from
*p*
to*_per_*
- (!) refactor:
ratio
changed to the NTTP kind - (!) refactor:
exp
andExp
renamed toexponent
andExponent
- (!) refactor:
Scalar
concept renamed toScalableNumber
- (!) refactor: Dimensionless quantities redesigned to be of a
quantity
type - refactor:
math.h
function signatures refactored to use aQuantity
concept (thanks @kwikius) - refactor:
[[nodiscard]]
added to many functions - fix:
si::day
unit symbol fixed tod
(thanks @komputerwiz) - fix:
si::mole
unit symbol fixed tomol
(thanks @mikeford3) - (!) build: gcc-9 is no longer supported (at least gcc-10 is required)
- build: Visual Studio 16.7 support added
- build: linear_algebra updated to 0.7.0/stable
- build: fmt updated to 7.0.3
- build: range-v3 updated to 0.11.0
- build: catch2 updated to 2.13.0
- build: doxygen updated to 1.8.18
- build: ms-gsl 3.1.0 dependency added
- build: Removed the dependency on a git submodule with common CMake scripts
0.5.0 May 17, 2020¶
- Major refactoring and rewrite of the library
- Units are now independent from dimensions
- Dimensions now depend on units (base or coherent units are provided in a class template)
- Quantity gets a Dimension template parameter again (as unit does not provide information about its dimension anymore)
- Spaceship operator support added
- Added official CGS system support
- Added official data information system support
- Repository file tree cleanup
ratio
refactored to containExp
template parameter (thanks a lot @oschonrock!)- SI fundamental constants added
q_
prefix applied to all the UDLs (thanks @kwikius)unknown_unit
renamed tounknown_coherent_unit
- Project documentation greatly extended and switched to Sphinx
- A few more usage examples added
- ASCII-only output support added (thanks @yasamoka)
- Representation values formatting extended (thanks @rbrugo)
- Output streams formatting support added
- Linear algebra from
std::experimental::math
support added - Named SI units and their dimensions added (thanks @rbrugo
- libfmt updated to 6.2.0
- Added absolute functions and epsilon to math.h (thanks @mikeford3)
- Added a lot of prefixes to named units and introduced
alias_unit
(thanks @yasamoka) - Linking with Conan targets only when they exists (#98)
- All physical dimensions and units put into
physical
namespace - CMake improvements
- Velocity renamed to speed
Many thanks to GitHub users @oschonrock, @kwikius, and @i-ky for their support in drafting a new library design.
0.4.0 Nov 17, 2019¶
- Support for derived dimensions in
exp
added - Added
pow()
andsqrt()
operations on quantities units
removed from astd::experimental
namespace- Downcasting facility refactored so the user does not have to write the boilerplate code anymore
- From now on base dimensions should inherit from
base_dimension
class template - Added unit symbols definitions to
base_dimension
and derived units - Added support for
operator<<
onquantity
fmt
support added- Derived unit factory helpers refactored
- Refactored the way prefixed units are defined
0.3.1 Sep 18, 2019¶
- cmcstl2 dependency changed to range-v3 0.9.1
0.3.0 Sep 16, 2019¶
- The design as described on CppCon 2019 talk (https://youtu.be/0YW6yxkdhlU)
- Applied the feedback from the Cologne evening session
upcasting_traits
renamed todowncasting_traits
Dimension
template parameter removed from quantityunits
moved to astd::experimental
namespace- Leading underscore prefix removed from UDLs
- Added a few more derived dimensions
meter
renamed tometre
- Missing
operator*
added - Predefined dimensions moved to a dedicated directory
dimension_
prefix removed from names of derived dimensions- cmcstl2 library updated to 2019.09.19
base_dimension
is a value provided asconst&
to theexp
type- integrated with Compiler Explorer
- gsl-lite dependency removed
- Fractional dimension exponents support added
QuantityOf
concept introducedquantity_cast<U, Rep>()
support added
0.2.0 July 18, 2019¶
- The design as described on C++Now 2019 talk (https://youtu.be/wKchCktZPHU)
- Added C++20 features supported by gcc-9.1 (
std::remove_cvref_t
, down with typename,std::type_identity
) - Compile-time performance optimizations (
type_list
,common_ratio
,ratio
,conditional_t
)
0.1.0 May 18, 2019¶
- Initial library release
- Begin semantic versioning
- The last version to work with gcc-8