diff --git a/doc/DESIGN.md b/doc/DESIGN.md index 723a40f2..b999338d 100644 --- a/doc/DESIGN.md +++ b/doc/DESIGN.md @@ -404,12 +404,25 @@ template concept Velocity = Quantity && std::Same; ``` -4. Define the base and secondary units and provide upcasting traits for them: +4. Define units and provide upcasting traits for them: + + - base unit ```cpp -struct meter_per_second : derived_unit {}; -template<> struct upcasting_traits> : upcast_to {}; +struct meter : unit> {}; +template<> struct upcasting_traits> : upcast_to {}; +``` + - units with prefixes + +```cpp +struct kilometer : kilo {}; +template<> struct upcasting_traits> : upcast_to {}; +``` + + - derived units + +```cpp struct kilometer_per_hour : derived_unit {}; template<> struct upcasting_traits> : upcast_to {}; ```