diff --git a/docs/users_guide/framework_basics/design_overview.md b/docs/users_guide/framework_basics/design_overview.md index ce7f4441..da38cd95 100644 --- a/docs/users_guide/framework_basics/design_overview.md +++ b/docs/users_guide/framework_basics/design_overview.md @@ -231,8 +231,8 @@ For example: A unit can be defined by the user in one of the following ways: ```cpp -template struct kilo_ : prefixed_unit<"k", mag_power<10, 3>, U> {}; -template inline constexpr kilo_ kilo; +template struct kilo_ : prefixed_unit<"k", mag_power<10, 3>, U{}> {}; +template inline constexpr kilo_ kilo; inline constexpr struct second : named_unit<"s", kind_of> {} second; inline constexpr struct minute : named_unit<"min", mag<60> * second> {} minute; diff --git a/docs/users_guide/framework_basics/systems_of_units.md b/docs/users_guide/framework_basics/systems_of_units.md index 8f341023..3d263c11 100644 --- a/docs/users_guide/framework_basics/systems_of_units.md +++ b/docs/users_guide/framework_basics/systems_of_units.md @@ -137,8 +137,8 @@ unit magnitude in a more flexible way. Each prefix is implemented similarly to the following: ```cpp -template struct quecto_ : prefixed_unit<"q", mag_power<10, -30>, U> {}; -template inline constexpr quecto_ quecto; +template struct quecto_ : prefixed_unit<"q", mag_power<10, -30>, U{}> {}; +template inline constexpr quecto_ quecto; ``` and then a [PrefixableUnit](concepts.md#PrefixableUnit) can be prefixed in the following @@ -153,8 +153,8 @@ efficiently represent any rational magnitude. For example, IEC 80000 prefixes us IT industry can be implemented as: ```cpp -template struct yobi_ : prefixed_unit<"Yi", mag_power<2, 80>, U> {}; -template inline constexpr yobi_ yobi; +template struct yobi_ : prefixed_unit<"Yi", mag_power<2, 80>, U{}> {}; +template inline constexpr yobi_ yobi; ``` ## Scaled units diff --git a/docs/users_guide/framework_basics/text_output.md b/docs/users_guide/framework_basics/text_output.md index 4b21b482..de8c96ea 100644 --- a/docs/users_guide/framework_basics/text_output.md +++ b/docs/users_guide/framework_basics/text_output.md @@ -62,14 +62,14 @@ and units of derived quantities. === "Prefixes" ```cpp - template struct micro_ : prefixed_unit<{u8"µ", "u"}, mag_power<10, -6>, U> {}; - template struct milli_ : prefixed_unit<"m", mag_power<10, -3>, U> {}; - template struct centi_ : prefixed_unit<"c", mag_power<10, -2>, U> {}; - template struct deci_ : prefixed_unit<"d", mag_power<10, -1>, U> {}; - template struct deca_ : prefixed_unit<"da", mag_power<10, 1>, U> {}; - template struct hecto_ : prefixed_unit<"h", mag_power<10, 2>, U> {}; - template struct kilo_ : prefixed_unit<"k", mag_power<10, 3>, U> {}; - template struct mega_ : prefixed_unit<"M", mag_power<10, 6>, U> {}; + template struct micro_ : prefixed_unit<{u8"µ", "u"}, mag_power<10, -6>, U{}> {}; + template struct milli_ : prefixed_unit<"m", mag_power<10, -3>, U{}> {}; + template struct centi_ : prefixed_unit<"c", mag_power<10, -2>, U{}> {}; + template struct deci_ : prefixed_unit<"d", mag_power<10, -1>, U{}> {}; + template struct deca_ : prefixed_unit<"da", mag_power<10, 1>, U{}> {}; + template struct hecto_ : prefixed_unit<"h", mag_power<10, 2>, U{}> {}; + template struct kilo_ : prefixed_unit<"k", mag_power<10, 3>, U{}> {}; + template struct mega_ : prefixed_unit<"M", mag_power<10, 6>, U{}> {}; ``` === "Constants"