diff --git a/HEAD/api_reference/gen/defs.html b/HEAD/api_reference/gen/defs.html index 1ecf3038..d9e00772 100644 --- a/HEAD/api_reference/gen/defs.html +++ b/HEAD/api_reference/gen/defs.html @@ -1,11 +1,11 @@ -[defs]

3 Terms and definitions [defs]

For the purposes of this document, +[defs]

3 Terms and definitions [defs]

For the purposes of this document, the terms and definitions given in IEC 60050-102:2007/AMD3:2021, IEC 60050-112:2010/AMD2:2020, ISO 80000-2:2019, and N4971, -and the following apply.
ISO and IEC maintain terminology databases +and the following apply.
ISO and IEC maintain terminology databases for use in standardization at the following addresses: diff --git a/HEAD/api_reference/gen/full.html b/HEAD/api_reference/gen/full.html index 932ef5c7..c6169d95 100644 --- a/HEAD/api_reference/gen/full.html +++ b/HEAD/api_reference/gen/full.html @@ -1,4 +1,4 @@ -14882

1 Scope [scope]

This document describes the contents of the mp-units library.

2 References [refs]

The following documents are referred to in the text +14882

1 Scope [scope]

This document describes the contents of the mp-units library.

2 References [refs]

The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document.
For dated references, only the edition cited applies.
For undated references, the latest edition of the referenced document @@ -6,29 +6,29 @@ the latest edition of the referenced document Amendment 3 — International Electrotechnical Vocabulary (IEV) — Part 102: Mathematics — General concepts and linear algebra
  • IEC 60050-112:2010/AMD2:2020, Amendment 2 — International Electrotechnical Vocabulary (IEV) — -Part 112: Quantities and units
  • ISO 80000 (all parts), Quantities and units
  • The C++ Standards Committee.
    N4971: Working Draft, Standard for Programming Language C++.
    Edited by Thomas Köppe.
    Available from: https://wg21.link/N4971
  • The C++ Standards Committee.
    SD-8: Standard Library Compatibility.
    Edited by Bryce Lelbach.
    Available from: https://wg21.link/SD8
  • 3 Terms and definitions [defs]

    For the purposes of this document, +Part 112: Quantities and units
  • ISO 80000 (all parts), Quantities and units
  • The C++ Standards Committee.
    N4971: Working Draft, Standard for Programming Language C++.
    Edited by Thomas Köppe.
    Available from: https://wg21.link/N4971
  • The C++ Standards Committee.
    SD-8: Standard Library Compatibility.
    Edited by Bryce Lelbach.
    Available from: https://wg21.link/SD8
  • 3 Terms and definitions [defs]

    For the purposes of this document, the terms and definitions given in IEC 60050-102:2007/AMD3:2021, IEC 60050-112:2010/AMD2:2020, ISO 80000-2:2019, and N4971, -and the following apply.
    ISO and IEC maintain terminology databases +and the following apply.
    ISO and IEC maintain terminology databases for use in standardization at the following addresses: -

    4 Specification [spec]

    4.1 External [spec.ext]

    The specification of the mp-units library subsumes +

    4 Specification [spec]

    4.1 External [spec.ext]

    The specification of the mp-units library subsumes N4971, [description], N4971, [requirements], N4971, [concepts.equality], and SD-8, all assumingly amended for the context of this library.
    [Note 1: 
    This means that, non exhaustively,
    • ​::​mp_units2 is a reserved namespace, and
    • std​::​vector<mp_units​::​type> is a program-defined specialization and a library-defined specialization -from the point of view of the C++ standard library and the mp-units library, respectively.
    — end note]
    The mp-units library is not part of the C++ implementation.

    4.2 Categories [spec.cats]

    Detailed specifications for each of the components in the library are in +from the point of view of the C++ standard library and the mp-units library, respectively.
    — end note]
    The mp-units library is not part of the C++ implementation.

    4.2 Categories [spec.cats]

    Detailed specifications for each of the components in the library are in [qties][qties], -as shown in Table 1.
    Table 1: Library categories [tab:lib.cats]
    Clause
    Category
    Quantities library
    The quantities library ([qties]) -describes components for dealing with quantities.

    4.3 Modules [spec.mods]

    The mp-units library provides the +as shown in Table 1.
    Table 1: Library categories [tab:lib.cats]
    Clause
    Category
    Quantities library
    The quantities library ([qties]) +describes components for dealing with quantities.

    4.3 Modules [spec.mods]

    The mp-units library provides the mp-units modules, -shown in Table 2.
    Table 2: mp-units modules [tab:modules]
    mp_units
    mp_units.core
    mp_units.systems

    4.4 Library-wide requirements [spec.reqs]

    4.4.1 Reserved names [spec.res.names]

    The mp-units library reserves macro names that start with -MP_UNITSdigit-sequence_.

    5 Quantities library [qties]

    5.1 Summary [qties.summary]

    This Clause describes components for dealing with quantities, +shown in Table 2.
    Table 2: mp-units modules [tab:modules]
    mp_units
    mp_units.core
    mp_units.systems

    4.4 Library-wide requirements [spec.reqs]

    4.4.1 Reserved names [spec.res.names]

    The mp-units library reserves macro names that start with +MP_UNITSdigit-sequence_.

    5 Quantities library [qties]

    5.1 Summary [qties.summary]

    This Clause describes components for dealing with quantities, as summarized in Table 3.
    Table 3: Quantities library summary [tab:qties.summary]
    Subclause
    Module
    Helpers
    mp_units.core
    Traits
    Concepts
    Types
    Compatibility
    Dimension one
    Systems
    mp_units.systems
    std​::​chrono compatibility

    5.2 Module mp_units synopsis [mp.units.syn]

    export module mp_units; export import mp_units.core; @@ -109,7 +109,7 @@ as summarized in Table }

    5.5 Helpers [qty.helpers]

    consteval bool converts-to-base-subobject-of(std::meta type, std::meta template_name); -
    Preconditions: is_type(type) && is_template(template_name) is true.
    Returns: true if +
    Preconditions: is_type(type) && is_template(template_name) is true.
    Returns: true if [:type:] has an unambiguous and accessible base that is a specialization of [:template_name:], and false otherwise.

    5.6 Traits [qty.traits]

    template<typename Rep> @@ -121,7 +121,7 @@ that is a specialization of [template<typename Rep> constexpr bool is_tensor = false; -
    Remarks: Pursuant to N4971, [namespace.std] ([spec.ext]), +
    Remarks: Pursuant to N4971, [namespace.std] ([spec.ext]), users may specialize is_scalar, is_vector, and is_tensor to true for cv-unqualified program-defined types which respectively represent @@ -145,12 +145,12 @@ and false for types whi named-quantity-spec<T> || detail::IntermediateDerivedQuantitySpec<T> || template_of(^T) == ^kind_of; -

    5.8 Types [qty.types]

    5.8.1 General [qty.types.general]

    5.8 Types [qty.types]

    5.8.1 General [qty.types.general]

    A quantity type is a type Q that is a specialization of quantity or quantity_point.
    Q represents a quantity (IEC 60050, 112-01-01) with Q​::​rep as its number and Q​::​reference as its reference.
    Q is a structural type (N4971, [temp.param]) -if Q​::​rep is a structural type.
    Each class template defined in subclause [qty.types] +if Q​::​rep is a structural type.
    Each class template defined in subclause [qty.types] has data members and special members specified below, and has no base classes or members other than those specified.

    5.8.2 Class template quantity [qty.type]

    namespace mp_units { diff --git a/HEAD/api_reference/gen/fulltoc.html b/HEAD/api_reference/gen/fulltoc.html index 50c92890..7a38b15f 100644 --- a/HEAD/api_reference/gen/fulltoc.html +++ b/HEAD/api_reference/gen/fulltoc.html @@ -11,4 +11,4 @@ h4 { margin: 0.1em 5pt 0.1em 5pt; border-bottom: 1px dashed rgba(0, 0, 0, 0.2); h3 { border-bottom-color: #b0b0b05a; } h4 { border-bottom-color: #b0b0b05a; } } -

    mp-units Library Reference Documentations

    (Generated on 2024-11-05 from the LaTeX sources by cxxdraft-htmlgen. This is not an ISO publication.)

    Note: this is an early draft. It's known to be incomplet and incorrekt, and it has lots of bad formatting.

    Contents

    1 Scope [scope]

    2 References [refs]

    3 Terms and definitions [defs]

    4 Specification [spec]

    4.1 External [spec.ext]

    4.2 Categories [spec.cats]

    4.4 Library-wide requirements [spec.reqs]

    4.4.1 Reserved names [spec.res.names]

    5 Quantities library [qties]

    5.2 Module mp_units synopsis [mp.units.syn]

    5.3 Module mp_units.core synopsis [mp.units.core.syn]

    5.4 Module mp_units.systems synopsis [mp.units.systems.syn]

    5.8 Types [qty.types]

    5.8.2 Class template quantity [qty.type]

    5.8.3 Class template quantity_point [qty.point.type]

    5.9 Compatibility [qty.compat]

    5.10 Dimension one [qty.one]

    5.12 std​::​chrono compatibility [qty.chrono]

    Index

    Index of library modules

    Index of library names

    Index of library concepts

    \ No newline at end of file +

    mp-units Library Reference Documentations

    (Generated on 2024-11-05 from the LaTeX sources by cxxdraft-htmlgen. This is not an ISO publication.)

    Note: this is an early draft. It's known to be incomplet and incorrekt, and it has lots of bad formatting.

    Contents

    1 Scope [scope]

    2 References [refs]

    3 Terms and definitions [defs]

    4 Specification [spec]

    4.1 External [spec.ext]

    4.2 Categories [spec.cats]

    4.4 Library-wide requirements [spec.reqs]

    4.4.1 Reserved names [spec.res.names]

    5 Quantities library [qties]

    5.2 Module mp_units synopsis [mp.units.syn]

    5.3 Module mp_units.core synopsis [mp.units.core.syn]

    5.4 Module mp_units.systems synopsis [mp.units.systems.syn]

    5.8 Types [qty.types]

    5.8.2 Class template quantity [qty.type]

    5.8.3 Class template quantity_point [qty.point.type]

    5.9 Compatibility [qty.compat]

    5.10 Dimension one [qty.one]

    5.12 std​::​chrono compatibility [qty.chrono]

    Index

    Index of library modules

    Index of library names

    Index of library concepts

    \ No newline at end of file diff --git a/HEAD/api_reference/gen/index.html b/HEAD/api_reference/gen/index.html index 58652714..149128ff 100644 --- a/HEAD/api_reference/gen/index.html +++ b/HEAD/api_reference/gen/index.html @@ -12,4 +12,4 @@ div.tocChapter { display: none; } h3 { border-bottom-color: #b0b0b05a; } h4 { border-bottom-color: #b0b0b05a; } } -

    mp-units Library Reference Documentations

    (Generated on 2024-11-05 from the LaTeX sources by cxxdraft-htmlgen. This is not an ISO publication.)

    Note: this is an early draft. It's known to be incomplet and incorrekt, and it has lots of bad formatting.

    Contents

    2 References [refs][refs]

    3 Terms and definitions [defs][defs]

    4 Specification [spec][spec]

    4.1 External [spec.ext]

    4.2 Categories [spec.cats]

    4.4 Library-wide requirements [spec.reqs]

    4.4.1 Reserved names [spec.res.names]

    5 Quantities library [qties][qties]

    5.2 Module mp_units synopsis [mp.units.syn]

    5.3 Module mp_units.core synopsis [mp.units.core.syn]

    5.4 Module mp_units.systems synopsis [mp.units.systems.syn]

    5.8 Types [qty.types]

    5.8.2 Class template quantity [qty.type]

    5.8.3 Class template quantity_point [qty.point.type]

    5.9 Compatibility [qty.compat]

    5.10 Dimension one [qty.one]

    5.12 std​::​chrono compatibility [qty.chrono]

    Index

    Index of library modules

    Index of library names

    Index of library concepts

    \ No newline at end of file +

    mp-units Library Reference Documentations

    (Generated on 2024-11-05 from the LaTeX sources by cxxdraft-htmlgen. This is not an ISO publication.)

    Note: this is an early draft. It's known to be incomplet and incorrekt, and it has lots of bad formatting.

    Contents

    2 References [refs][refs]

    3 Terms and definitions [defs][defs]

    4 Specification [spec][spec]

    4.1 External [spec.ext]

    4.2 Categories [spec.cats]

    4.4 Library-wide requirements [spec.reqs]

    4.4.1 Reserved names [spec.res.names]

    5 Quantities library [qties][qties]

    5.2 Module mp_units synopsis [mp.units.syn]

    5.3 Module mp_units.core synopsis [mp.units.core.syn]

    5.4 Module mp_units.systems synopsis [mp.units.systems.syn]

    5.8 Types [qty.types]

    5.8.2 Class template quantity [qty.type]

    5.8.3 Class template quantity_point [qty.point.type]

    5.9 Compatibility [qty.compat]

    5.10 Dimension one [qty.one]

    5.12 std​::​chrono compatibility [qty.chrono]

    Index

    Index of library modules

    Index of library names

    Index of library concepts

    \ No newline at end of file diff --git a/HEAD/api_reference/gen/qties.html b/HEAD/api_reference/gen/qties.html index 094c47a4..c02429ca 100644 --- a/HEAD/api_reference/gen/qties.html +++ b/HEAD/api_reference/gen/qties.html @@ -1,4 +1,4 @@ -[qties]

    5 Quantities library [qties]

    5.1 Summary [qties.summary]

    This Clause describes components for dealing with quantities, +[qties]

    5 Quantities library [qties]

    5.1 Summary [qties.summary]

    This Clause describes components for dealing with quantities, as summarized in Table 3.
    Table 3: Quantities library summary [tab:qties.summary]
    Subclause
    Module
    Helpers
    mp_units.core
    Traits
    Concepts
    Types
    Compatibility
    Dimension one
    Systems
    mp_units.systems
    std​::​chrono compatibility

    5.2 Module mp_units synopsis [mp.units.syn]

    export module mp_units; export import mp_units.core; @@ -79,7 +79,7 @@ as summarized in Table }

    5.5 Helpers [qty.helpers]

    consteval bool converts-to-base-subobject-of(std::meta type, std::meta template_name); -
    Preconditions: is_type(type) && is_template(template_name) is true.
    Returns: true if +
    Preconditions: is_type(type) && is_template(template_name) is true.
    Returns: true if [:type:] has an unambiguous and accessible base that is a specialization of [:template_name:], and false otherwise.

    5.6 Traits [qty.traits]

    template<typename Rep> @@ -91,7 +91,7 @@ that is a specialization of [template<typename Rep> constexpr bool is_tensor = false; -
    Remarks: Pursuant to N4971, [namespace.std] ([spec.ext]), +
    Remarks: Pursuant to N4971, [namespace.std] ([spec.ext]), users may specialize is_scalar, is_vector, and is_tensor to true for cv-unqualified program-defined types which respectively represent @@ -115,12 +115,12 @@ and false for types whi named-quantity-spec<T> || detail::IntermediateDerivedQuantitySpec<T> || template_of(^T) == ^kind_of; -

    5.8 Types [qty.types]

    5.8.1 General [qty.types.general]

    5.8 Types [qty.types]

    5.8.1 General [qty.types.general]

    A quantity type is a type Q that is a specialization of quantity or quantity_point.
    Q represents a quantity (IEC 60050, 112-01-01) with Q​::​rep as its number and Q​::​reference as its reference.
    Q is a structural type (N4971, [temp.param]) -if Q​::​rep is a structural type.
    Each class template defined in subclause [qty.types] +if Q​::​rep is a structural type.
    Each class template defined in subclause [qty.types] has data members and special members specified below, and has no base classes or members other than those specified.

    5.8.2 Class template quantity [qty.type]

    namespace mp_units { diff --git a/HEAD/api_reference/gen/qties.summary.html b/HEAD/api_reference/gen/qties.summary.html index 4b82da46..dd95808b 100644 --- a/HEAD/api_reference/gen/qties.summary.html +++ b/HEAD/api_reference/gen/qties.summary.html @@ -1,2 +1,2 @@ -[qties.summary]

    5 Quantities library [qties]

    5.1 Summary [qties.summary]

    This Clause describes components for dealing with quantities, +[qties.summary]

    5 Quantities library [qties]

    5.1 Summary [qties.summary]

    This Clause describes components for dealing with quantities, as summarized in Table 3.
    Table 3: Quantities library summary [tab:qties.summary]
    Subclause
    Module
    Helpers
    mp_units.core
    Traits
    Concepts
    Types
    Compatibility
    Dimension one
    Systems
    mp_units.systems
    std​::​chrono compatibility
    \ No newline at end of file diff --git a/HEAD/api_reference/gen/qty.helpers.html b/HEAD/api_reference/gen/qty.helpers.html index 61c23dba..d54b1296 100644 --- a/HEAD/api_reference/gen/qty.helpers.html +++ b/HEAD/api_reference/gen/qty.helpers.html @@ -1,5 +1,5 @@ [qty.helpers]

    5 Quantities library [qties]

    5.5 Helpers [qty.helpers]

    consteval bool converts-to-base-subobject-of(std::meta type, std::meta template_name); -
    Preconditions: is_type(type) && is_template(template_name) is true.
    Returns: true if +
    Preconditions: is_type(type) && is_template(template_name) is true.
    Returns: true if [:type:] has an unambiguous and accessible base that is a specialization of [:template_name:], and false otherwise.
    \ No newline at end of file diff --git a/HEAD/api_reference/gen/qty.traits.html b/HEAD/api_reference/gen/qty.traits.html index 37e49cd1..c2ffa598 100644 --- a/HEAD/api_reference/gen/qty.traits.html +++ b/HEAD/api_reference/gen/qty.traits.html @@ -7,7 +7,7 @@ template<typename Rep> constexpr bool is_tensor = false; -
    Remarks: Pursuant to N4971, [namespace.std] ([spec.ext]), +
    Remarks: Pursuant to N4971, [namespace.std] ([spec.ext]), users may specialize is_scalar, is_vector, and is_tensor to true for cv-unqualified program-defined types which respectively represent diff --git a/HEAD/api_reference/gen/qty.types.general.html b/HEAD/api_reference/gen/qty.types.general.html index 5385a490..2a8f74ef 100644 --- a/HEAD/api_reference/gen/qty.types.general.html +++ b/HEAD/api_reference/gen/qty.types.general.html @@ -1,8 +1,8 @@ -[qty.types.general]

    5 Quantities library [qties]

    5.8 Types [qty.types]

    5.8.1 General [qty.types.general]

    A quantity type +[qty.types.general]

    5 Quantities library [qties]

    5.8 Types [qty.types]

    5.8.1 General [qty.types.general]

    A quantity type is a type Q that is a specialization of quantity or quantity_point.
    Q represents a quantity (IEC 60050, 112-01-01) with Q​::​rep as its number and Q​::​reference as its reference.
    Q is a structural type (N4971, [temp.param]) -if Q​::​rep is a structural type.
    Each class template defined in subclause [qty.types] +if Q​::​rep is a structural type.
    Each class template defined in subclause [qty.types] has data members and special members specified below, and has no base classes or members other than those specified.
    \ No newline at end of file diff --git a/HEAD/api_reference/gen/qty.types.html b/HEAD/api_reference/gen/qty.types.html index 450adb70..af63c355 100644 --- a/HEAD/api_reference/gen/qty.types.html +++ b/HEAD/api_reference/gen/qty.types.html @@ -1,9 +1,9 @@ -[qty.types]

    5 Quantities library [qties]

    5.8 Types [qty.types]

    5.8.1 General [qty.types.general]

    A quantity type +[qty.types]

    5 Quantities library [qties]

    5.8 Types [qty.types]

    5.8.1 General [qty.types.general]

    A quantity type is a type Q that is a specialization of quantity or quantity_point.
    Q represents a quantity (IEC 60050, 112-01-01) with Q​::​rep as its number and Q​::​reference as its reference.
    Q is a structural type (N4971, [temp.param]) -if Q​::​rep is a structural type.
    Each class template defined in subclause [qty.types] +if Q​::​rep is a structural type.
    Each class template defined in subclause [qty.types] has data members and special members specified below, and has no base classes or members other than those specified.

    5.8.2 Class template quantity [qty.type]

    namespace mp_units { diff --git a/HEAD/api_reference/gen/refs.html b/HEAD/api_reference/gen/refs.html index f82b916f..0380706e 100644 --- a/HEAD/api_reference/gen/refs.html +++ b/HEAD/api_reference/gen/refs.html @@ -1,4 +1,4 @@ -[refs]

    2 References [refs]

    The following documents are referred to in the text +[refs]

    2 References [refs]

    The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document.
    For dated references, only the edition cited applies.
    For undated references, the latest edition of the referenced document diff --git a/HEAD/api_reference/gen/scope.html b/HEAD/api_reference/gen/scope.html index 16e42808..75bd6472 100644 --- a/HEAD/api_reference/gen/scope.html +++ b/HEAD/api_reference/gen/scope.html @@ -1 +1 @@ -[scope]

    1 Scope [scope]

    This document describes the contents of the mp-units library.
    \ No newline at end of file +[scope]

    1 Scope [scope]

    This document describes the contents of the mp-units library.
    \ No newline at end of file diff --git a/HEAD/api_reference/gen/spec.cats.html b/HEAD/api_reference/gen/spec.cats.html index c702d7ec..54e4d5c3 100644 --- a/HEAD/api_reference/gen/spec.cats.html +++ b/HEAD/api_reference/gen/spec.cats.html @@ -1,4 +1,4 @@ -[spec.cats]

    4 Specification [spec]

    4.2 Categories [spec.cats]

    Detailed specifications for each of the components in the library are in +[spec.cats]

    4 Specification [spec]

    4.2 Categories [spec.cats]

    Detailed specifications for each of the components in the library are in [qties][qties], -as shown in Table 1.
    Table 1: Library categories [tab:lib.cats]
    Clause
    Category
    Quantities library
    The quantities library ([qties]) +as shown in Table 1.
    Table 1: Library categories [tab:lib.cats]
    Clause
    Category
    Quantities library
    The quantities library ([qties]) describes components for dealing with quantities.
    \ No newline at end of file diff --git a/HEAD/api_reference/gen/spec.ext.html b/HEAD/api_reference/gen/spec.ext.html index ab17e6de..b8e2c69f 100644 --- a/HEAD/api_reference/gen/spec.ext.html +++ b/HEAD/api_reference/gen/spec.ext.html @@ -1,6 +1,6 @@ -[spec.ext]

    4 Specification [spec]

    4.1 External [spec.ext]

    The specification of the mp-units library subsumes +[spec.ext]

    4 Specification [spec]

    4.1 External [spec.ext]

    The specification of the mp-units library subsumes N4971, [description], N4971, [requirements], N4971, [concepts.equality], and SD-8, all assumingly amended for the context of this library.
    [Note 1: 
    This means that, non exhaustively,
    • ​::​mp_units2 is a reserved namespace, and
    • std​::​vector<mp_units​::​type> is a program-defined specialization and a library-defined specialization -from the point of view of the C++ standard library and the mp-units library, respectively.
    — end note]
    The mp-units library is not part of the C++ implementation.
    \ No newline at end of file +from the point of view of the C++ standard library and the mp-units library, respectively.
    — end note]
    The mp-units library is not part of the C++ implementation.
    \ No newline at end of file diff --git a/HEAD/api_reference/gen/spec.html b/HEAD/api_reference/gen/spec.html index 418bae79..1a615103 100644 --- a/HEAD/api_reference/gen/spec.html +++ b/HEAD/api_reference/gen/spec.html @@ -1,12 +1,12 @@ -[spec]

    4 Specification [spec]

    4.1 External [spec.ext]

    The specification of the mp-units library subsumes +[spec]

    4 Specification [spec]

    4.1 External [spec.ext]

    The specification of the mp-units library subsumes N4971, [description], N4971, [requirements], N4971, [concepts.equality], and SD-8, all assumingly amended for the context of this library.
    [Note 1: 
    This means that, non exhaustively,
    • ​::​mp_units2 is a reserved namespace, and
    • std​::​vector<mp_units​::​type> is a program-defined specialization and a library-defined specialization -from the point of view of the C++ standard library and the mp-units library, respectively.
    — end note]
    The mp-units library is not part of the C++ implementation.

    4.2 Categories [spec.cats]

    Detailed specifications for each of the components in the library are in +from the point of view of the C++ standard library and the mp-units library, respectively.
    — end note]
    The mp-units library is not part of the C++ implementation.

    4.2 Categories [spec.cats]

    Detailed specifications for each of the components in the library are in [qties][qties], -as shown in Table 1.
    Table 1: Library categories [tab:lib.cats]
    Clause
    Category
    Quantities library
    The quantities library ([qties]) -describes components for dealing with quantities.

    4.3 Modules [spec.mods]

    The mp-units library provides the +as shown in Table 1.
    Table 1: Library categories [tab:lib.cats]
    Clause
    Category
    Quantities library
    The quantities library ([qties]) +describes components for dealing with quantities.

    4.3 Modules [spec.mods]

    The mp-units library provides the mp-units modules, -shown in Table 2.
    Table 2: mp-units modules [tab:modules]
    mp_units
    mp_units.core
    mp_units.systems

    4.4 Library-wide requirements [spec.reqs]

    4.4.1 Reserved names [spec.res.names]

    The mp-units library reserves macro names that start with +shown in Table 2.
    Table 2: mp-units modules [tab:modules]
    mp_units
    mp_units.core
    mp_units.systems

    4.4 Library-wide requirements [spec.reqs]

    4.4.1 Reserved names [spec.res.names]

    The mp-units library reserves macro names that start with MP_UNITSdigit-sequence_.
    \ No newline at end of file diff --git a/HEAD/api_reference/gen/spec.mods.html b/HEAD/api_reference/gen/spec.mods.html index 2649adfa..dddeab46 100644 --- a/HEAD/api_reference/gen/spec.mods.html +++ b/HEAD/api_reference/gen/spec.mods.html @@ -1,3 +1,3 @@ -[spec.mods]

    4 Specification [spec]

    4.3 Modules [spec.mods]

    The mp-units library provides the +[spec.mods]

    4 Specification [spec]

    4.3 Modules [spec.mods]

    The mp-units library provides the mp-units modules, shown in Table 2.
    Table 2: mp-units modules [tab:modules]
    mp_units
    mp_units.core
    mp_units.systems
    \ No newline at end of file diff --git a/HEAD/api_reference/gen/spec.reqs.html b/HEAD/api_reference/gen/spec.reqs.html index d580ec86..111fc53e 100644 --- a/HEAD/api_reference/gen/spec.reqs.html +++ b/HEAD/api_reference/gen/spec.reqs.html @@ -1,2 +1,2 @@ -[spec.reqs]

    4 Specification [spec]

    4.4 Library-wide requirements [spec.reqs]

    4.4.1 Reserved names [spec.res.names]

    The mp-units library reserves macro names that start with +[spec.reqs]

    4 Specification [spec]

    4.4 Library-wide requirements [spec.reqs]

    4.4.1 Reserved names [spec.res.names]

    The mp-units library reserves macro names that start with MP_UNITSdigit-sequence_.
    \ No newline at end of file diff --git a/HEAD/api_reference/gen/spec.res.names.html b/HEAD/api_reference/gen/spec.res.names.html index d85462ad..39678b98 100644 --- a/HEAD/api_reference/gen/spec.res.names.html +++ b/HEAD/api_reference/gen/spec.res.names.html @@ -1,2 +1,2 @@ -[spec.res.names]

    4 Specification [spec]

    4.4 Library-wide requirements [spec.reqs]

    4.4.1 Reserved names [spec.res.names]

    The mp-units library reserves macro names that start with +[spec.res.names]

    4 Specification [spec]

    4.4 Library-wide requirements [spec.reqs]

    4.4.1 Reserved names [spec.res.names]

    The mp-units library reserves macro names that start with MP_UNITSdigit-sequence_.
    \ No newline at end of file diff --git a/HEAD/assets/images/social/blog/posts/2.4.0-released.png b/HEAD/assets/images/social/blog/posts/2.4.0-released.png new file mode 100644 index 00000000..d851ef95 Binary files /dev/null and b/HEAD/assets/images/social/blog/posts/2.4.0-released.png differ diff --git a/HEAD/blog/2024/11/04/international-system-of-quantities-isq-part-5---benefits/index.html b/HEAD/blog/2024/11/04/international-system-of-quantities-isq-part-5---benefits/index.html index e6bee65e..1169bf93 100644 --- a/HEAD/blog/2024/11/04/international-system-of-quantities-isq-part-5---benefits/index.html +++ b/HEAD/blog/2024/11/04/international-system-of-quantities-isq-part-5---benefits/index.html @@ -18,6 +18,8 @@ + + @@ -2788,6 +2790,22 @@ of the ISQ with a programming language.

    + + + + + + diff --git a/HEAD/blog/2024/11/05/mp-units-240-released/index.html b/HEAD/blog/2024/11/05/mp-units-240-released/index.html new file mode 100644 index 00000000..6e26da25 --- /dev/null +++ b/HEAD/blog/2024/11/05/mp-units-240-released/index.html @@ -0,0 +1,2734 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mp-units 2.4.0 released! - mp-units + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + +
    + + +
    + +
    + + + + + + + + + +
    +
    + + + + + + + + + + +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + +

    mp-units 2.4.0 released!

    +

    A new product version can be obtained from +GitHub and +Conan.

    +

    This release was unexpected. We planned a significant new feature to happen next, but while +preparing for it, and also while writing API Reference documentation, we made so many vital fixes +and improvements that we decided that they deserve a dedicated release first.

    +

    This post describes the most significant improvements while a much longer list of the changes +introduced by the new version can be found in our Release Notes.

    + + +

    ISQ quantities cleanup

    +

    Initially, we kept quantities defined in "IEC 80000-13: Information science and technology" in +a standalone iec80000 namespace, which was renamed to iec in the previous release. +It turned out that this was incorrect. Those quantities are also a part of the ISQ. This is why, +in this release, we moved all of them to the isq namespace (💥 breaking change 💥).

    +

    From now on, iec namespace does not provide any quantities and serves purely as a system of units +definition. It contains binary prefixes (based on the powers of two) and some units introduced +by IEC (e.g., var, erlang, bit, or `baud).

    +
    +

    Note

    +

    The quantities in iec namespace are now deprecated and will be removed in future releases.

    +
    +

    Also, it turns out that the latest ISO 80000-3 revision makes a small cleanup to the phase_speed +and group_speed quantities. Those were always defined as scalar quantities but also had +alternative names phase_velocity and group_velocity. This is misleading as velocity is +typically considered a vector quantity. It is why those XXX_velocity aliases were removed from +the ISO standard and from mp-units library (💥 breaking change 💥).

    +

    Units equality

    +

    Previously we assumed that units like J, N m, and kg m²/s² are equal. In some cases, +this might not be entirely correct. Some quantities require a specific derived unit instead of +a unit with a special name. For example:

    +
      +
    • N m should be used for moment of force (instead of J),
    • +
    • V A should be used for apparent power (instead of W).
    • +
    +

    This is why, starting from this release units like J, N m, and kg m²/s² will not compare equal +(💥 breaking change 💥). However, they are deemed equivalent:

    +
    static_assert(equivalent(J, N * m));
    +static_assert(equivalent(W, V * A));
    +
    +

    Portable text output

    +

    From the very beginning, the text output of symbols could be formatted in two different ways:

    +
      +
    • Unicode,
    • +
    • portable using so-called ASCII alternatives.
    • +
    +

    mp-units used the terms "Unicode" or "ASCII" and 'U' or 'A' formatting options for them. +Even though those terms are widely understood in the C++ community, they are technically +incorrect.

    +

    During the recent SG16 meeting, we looked for proper alternatives and ended up with the "portable" +and "UTF-8" terms (💥 breaking change 💥).

    +

    From now on, we will provide the following:

    +
      +
    • text_encoding::utf8, symbol_text<N, M>::utf8(), and U formatting option,
    • +
    • text_encoding::portable, symbol_text<N, M>::portable(), and P formatting option.
    • +
    +
    +

    Note

    +

    The old identifiers and formatting options are now deprecated and will be removed in future +releases.

    +
    +

    char_traits removed from fixed_string

    +

    During the same SG16 meeting, the room was strongly against providing char_traits for +fixed_string. This is why char_traits support was removed in this release +(💥 breaking change 💥).

    +

    Improved units' text output

    +

    In the previous release, we introduced common unit abstraction. Initially, all its components +were printed in parenthesis which contained a list of all the scaled units separated with =. +After some feedback, we decided to change it to a new syntax.

    +

    For example, the following:

    +
    std::cout << 1 * km + 1 * mi << "\n";
    +std::cout << 1 * nmi + 1 * mi << "\n";
    +std::cout << 1 * km / h + 1 * m / s << "\n";
    +
    +

    will print:

    +
    +
    +
    +
    40771 EQUIV{[1/25146 mi], [1/15625 km]}
    +108167 EQUIV{[1/50292 mi], [1/57875 nmi]}
    +23 EQUIV{[1/5 km/h], [1/18 m/s]}
    +
    +
    +
    +
    40771 ([1/25146] mi = [1/15625] km)
    +108167 ([1/50292] mi = [1/57875] nmi)
    +23 ([1/5] km/h = [1/18] m/s)
    +
    +
    +
    +
    +

    As we can see above, the scaled units output changed as well. Now, the entire scaled unit is +encapsulated within [...] brackets to better denote its scope.

    +

    Additionally, small magnitudes of scaled units do not use the power of 10, and also scaled +units do not have a composition priority over the derived units anymore.

    +

    As a result of those changes, the following:

    +
    constexpr Unit auto L_per_100km = L / (mag<100> * km);
    +std::cout << 6.7 * L_per_100km << "\n";
    +
    +

    prints:

    +
    +
    +
    +
    6.7 L/[100 km]
    +
    +
    +
    +
    6.7 × 10⁻² l/km
    +
    +
    +
    +
    +

    One more change that we can see above is that litre now use 'L' instead of 'l' for its symbol. +The latter one too often is confused with the number 1.

    +

    The next improvement adds proper formatting support for magnitudes. All of the formatting options +that were working before for the unit symbols now also work for magnitudes.

    +

    For example:

    +
    using enum text_encoding;
    +using enum unit_symbol_solidus;
    +using usf = unit_symbol_formatting;
    +
    +static_assert(unit_symbol(mag<1> / (mag<2> * mag<pi>)*metre) == "[2⁻¹ 𝜋⁻¹ m]");
    +static_assert(unit_symbol<usf{.solidus = always}>(mag<1> / (mag<2> * mag<pi>)*metre) == "[1/(2 𝜋) m]");
    +static_assert(unit_symbol<usf{.encoding = portable, .solidus = always}>(mag<1> / (mag<2> * mag<pi>)*metre) ==
    +              "[1/(2 pi) m]");
    +
    +

    As we can see above, the library also learned how to print magnitude symbols. This required +a change in the mag_constant definition. Now, it takes a magnitude symbol and has to be final +like for other similar types in the library (💥 breaking change 💥):

    +
    inline constexpr struct pi final : mag_constant<symbol_text{u8"π", "pi"}, std::numbers::pi_v<long double>> {} pi;
    +inline constexpr auto π = pi;
    +
    +

    Unicode identifiers

    +

    The example above introduced something interesting: a π identifier for a variable. With the +latest changes to the C++ language, we can officially use Unicode symbols as identifiers in +the C++ code.

    +

    In this release, we've added Unicode identifiers support not only for π magnitude constant +but also for unit symbols.

    +

    Now we can type the following:

    +
    +
    +
    +
    quantity resistance = 60 * ;
    +quantity capacitance = 100 * µF;
    +
    +
    +
    +
    quantity resistance = 60 * kohm;
    +quantity capacitance = 100 * uF;
    +
    +
    +
    +
    +

    This might make the source code easier to understand, but typing those identifiers can be tricky. +Sometimes, the best solution to type it might be a copy-paste approach. If we do not like this +idea, we can still use old portable identifiers for those as well.

    +

    Convertibility with QuantityLike and QuantityPointLike entities

    +

    In this release, we decided to fine-tune further the traits that customize the conversion between +custom quantity and quantity point types and the ones provided with mp-units +(💥 breaking change 💥).

    +

    Previously, to_numerical_value and from_numerical_value returned a type wrapped in a special +tag type describing the conversion type (explicit or implicit).

    +

    This was a novel and experimental approach. Finally, we decided not to do it and used a bit more +verbose but a more standard solution. From now on, we need to provide two additional static data +members of type bool:

    +
      +
    • explicit_import - true means that the conversion to the mp-units abstraction is explicit,
    • +
    • explicit_export - true means that the conversion from the mp-units abstraction is + explicit.
    • +
    +
    +
    +
    +
    template<>
    +struct mp_units::quantity_point_like_traits<Timestamp> {
    +  static constexpr auto reference = si::second;
    +  static constexpr auto point_origin = default_point_origin(reference);
    +  static constexpr bool explicit_import = false;
    +  static constexpr bool explicit_export = true;
    +  using rep = decltype(Timestamp::seconds);
    +
    +  static constexpr rep to_numerical_value(Timestamp ts)
    +  {
    +    return ts.seconds;
    +  }
    +
    +  static constexpr Timestamp from_numerical_value(rep v)
    +  {
    +    return Timestamp(v);
    +  }
    +};
    +
    +
    +
    +
    template<>
    +struct mp_units::quantity_point_like_traits<Timestamp> {
    +  static constexpr auto reference = si::second;
    +  static constexpr auto point_origin = default_point_origin(reference);
    +  using rep = decltype(Timestamp::seconds);
    +
    +  static constexpr convert_implicitly<rep> to_numerical_value(Timestamp ts)
    +  {
    +    return ts.seconds;
    +  }
    +
    +  static constexpr convert_explicitly<Timestamp> from_numerical_value(rep v)
    +  {
    +    return Timestamp(v);
    +  }
    +};
    +
    +
    +
    +
    +

    Symbolic constants implementation should be implementation-defined

    +

    In the process of writing API Reference, we decided to hide all the metadata associated with +symbolic constants - tag types used to define units, dimensions, quantity specification, etc. +(💥 breaking change 💥).

    +

    All the types and values exposed by such types are needed only in the implementation details +of the library. Users should not need them. Hiding those and making them +implementation-defined gives other vendors the freedom to choose different ways to implement +features of this library in their codebases.

    +
    +

    Important

    +

    Based on Hyrum's Law some users may depend on this +information already, and this release will break their code.

    +

    If that is the case for you, we would love to hear about your use case and its rationale. +It may mean that we should either:

    +
      +
    • extend the library's functionality to support your use case out of the box and keep those + members hidden,
    • +
    • restore public visibility of such members and enforce this in the API Reference so that all + the users of various library implementations may use them in the same way as you.
    • +
    +
    + + + + + + + + + + + + + + + + + +

    Comments

    + + + + + + +
    +
    + + + +
    + + + +
    + + + +
    +
    +
    +
    + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/HEAD/blog/archive/2024/index.html b/HEAD/blog/archive/2024/index.html index 0ebdc353..997c0423 100644 --- a/HEAD/blog/archive/2024/index.html +++ b/HEAD/blog/archive/2024/index.html @@ -2187,6 +2187,60 @@ You're not viewing the latest version. + + +
    +

    mp-units 2.4.0 released!

    +

    A new product version can be obtained from +GitHub and +Conan.

    +

    This release was unexpected. We planned a significant new feature to happen next, but while +preparing for it, and also while writing API Reference documentation, we made so many vital fixes +and improvements that we decided that they deserve a dedicated release first.

    +

    This post describes the most significant improvements while a much longer list of the changes +introduced by the new version can be found in our Release Notes.

    + + + + +
    + + +
    +
    + + +
    +
    +

    mp-units 2.4.0 released!

    +

    A new product version can be obtained from +GitHub and +Conan.

    +

    This release was unexpected. We planned a significant new feature to happen next, but while +preparing for it, and also while writing API Reference documentation, we made so many vital fixes +and improvements that we decided that they deserve a dedicated release first.

    +

    This post describes the most significant improvements while a much longer list of the changes +introduced by the new version can be found in our Release Notes.

    + + + + +
    +
    + +
    +
    + + +
    +
    +

    mp-units 2.4.0 released!

    +

    A new product version can be obtained from +GitHub and +Conan.

    +

    This release was unexpected. We planned a significant new feature to happen next, but while +preparing for it, and also while writing API Reference documentation, we made so many vital fixes +and improvements that we decided that they deserve a dedicated release first.

    +

    This post describes the most significant improvements while a much longer list of the changes +introduced by the new version can be found in our Release Notes.

    + + + + +
    +
    + +
    +
    + + +
    -
    -
    - - - - -
    -
    -

    mp-units 2.1.0 released!

    -

    A new product version can be obtained from -GitHub and -Conan.

    -

    The list of the most significant changes introduced by the new version can be found in our -Release Notes. We will also describe the most important of them -in this post.

    - - - - -
    -
    - diff --git a/HEAD/blog/page/2/index.html b/HEAD/blog/page/2/index.html index a7a52ade..6bad25e2 100644 --- a/HEAD/blog/page/2/index.html +++ b/HEAD/blog/page/2/index.html @@ -2173,6 +2173,58 @@ You're not viewing the latest version. + + +
    +

    mp-units 2.1.0 released!

    +

    A new product version can be obtained from +GitHub and +Conan.

    +

    The list of the most significant changes introduced by the new version can be found in our +Release Notes. We will also describe the most important of them +in this post.

    + + + + +
    + + +
    +
    + + +