From 2b24a031874c388e52eb30ef75bc9d120c1fe6e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fahller?= Date: Mon, 27 Jan 2025 14:48:04 +0100 Subject: [PATCH] Minor fixups to README --- README.md | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index c89e5f3..d13eff3 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ define the macro `STRONG_TYPE_IMPORT_STD_LIBRARY=1`. # Modifiers: -* `strong::affine_point` allows instances to be +* `strong::affine_point` allows instances to be subtracted (yielding a `D`) or to add or subtract a `D` to an instance. See [Affine Space](https://en.wikipedia.org/wiki/Affine_space). Examples of one dimentional affine points are pointer (with `D` being `ptrdiff_t`,) or @@ -197,7 +197,7 @@ define the macro `STRONG_TYPE_IMPORT_STD_LIBRARY=1`. * `strong::incrementable`. Provides - [`operator++](https://en.cppreference.com/w/cpp/language/operator_incdec) for + [`operator++`](https://en.cppreference.com/w/cpp/language/operator_incdec) for the strong type, using the operator of the underlying type. Available in `strong_type/incrementable.hpp` @@ -245,14 +245,14 @@ define the macro `STRONG_TYPE_IMPORT_STD_LIBRARY=1`. Available in `strong_type/iterator.hpp` -* `strong::ordered` provides operators '<', '<=', '>=' and - '>'. The strong type offers the same ordering relatin as the underlying type. +* `strong::ordered` provides operators `<`, `<=`, `>=` and + `>`. The strong type offers the same ordering relation as the underlying type. Available in `strong_type/ordered.hpp` -* `strong::ordered_with` provides operators '<', - '<=', '>=' and '>' between the strong type and each of the types `Ts...`. +* `strong::ordered_with` provides operators `<`, + `<=`, `>=` and `>` between the strong type and each of the types `Ts...`. Note! While `Ts` can include other strong types, it cannot refer to the strong type being defined. Use [`strong::ordered`](#ordered) for that. @@ -268,7 +268,7 @@ define the macro `STRONG_TYPE_IMPORT_STD_LIBRARY=1`. * `strong::partially_ordered` provides operator - '<=>' The strong type offers the same ordering relatin as the underlying type. + `<=>` The strong type offers the same ordering relation as the underlying type. The result is [`std::partial_ordering`](https://en.cppreference.com/w/cpp/utility/compare/partial_ordering). Note! This does not imply [´strong::equality´](#equality). @@ -276,7 +276,7 @@ define the macro `STRONG_TYPE_IMPORT_STD_LIBRARY=1`. * `strong::partially_ordered_with` - provides operator '<=>' between the strong type and each of the types `Ts...`. + provides operator `<=>` between the strong type and each of the types `Ts...`. Note! While `Ts` can include other strong types, it cannot refer to the strong type being defined. Use [`strong::partially_ordered`](#partially_ordered) for that. The result is [`std::partial_ordering`](https://en.cppreference.com/w/cpp/utility/compare/partial_ordering). @@ -301,8 +301,8 @@ define the macro `STRONG_TYPE_IMPORT_STD_LIBRARY=1`. Available in `strong_type/range.hpp` -* `strong::regular`. Same as [`semiregular`](#semiregular) - and also equality comparable. A good default base for most types. +* `strong::regular`. Same as [`strong::semiregular`](#semiregular) + and [`strong::equality`](#equality). A good default base for most types. Available in `strong_type/regular.hpp` @@ -315,14 +315,15 @@ define the macro `STRONG_TYPE_IMPORT_STD_LIBRARY=1`. Available in `strong_type/scalable_with.hpp` -* `strong::semiregular`. This gives you default - constructible, move/copy constructible, move/copy assignable and swappable. +* `strong::semiregular`. This gives you + [`strong::default_constructible`](#default_constructible) + move/copy constructible, move/copy assignable and swappable. A decent default for many types. Available in `strong_type/semiregular.hpp`. -* `strong::strongly_ordered` provides operator '<=>' +* `strong::strongly_ordered` provides operator `<=>` The strong type offers the same ordering relatin as the underlying type. The result is [`std::strong_ordering`](https://en.cppreference.com/w/cpp/utility/compare/strong_ordering). Note! This does not imply [´strong::equality´](#equality). @@ -331,7 +332,7 @@ define the macro `STRONG_TYPE_IMPORT_STD_LIBRARY=1`. * `strong::strongly_ordered_with` - provides operator '<=>' between the strong type and each of the types `Ts...`. + provides operator `<=>` between the strong type and each of the types `Ts...`. Note! While `Ts` can include other strong types, it cannot refer to the strong type being defined. Use [`strong::strongly_ordered`](#strongly_ordered) for that. The result is [`std::strong_ordering`](https://en.cppreference.com/w/cpp/utility/compare/strong_ordering) @@ -345,7 +346,7 @@ define the macro `STRONG_TYPE_IMPORT_STD_LIBRARY=1`. Available in `strong_type/unique.hpp` -* `strong::weakly_ordered` provides operator '<=>' +* `strong::weakly_ordered` provides operator `<=>` The strong type offers the same ordering relatin as the underlying type. The result is [`std::weak_ordering`](https://en.cppreference.com/w/cpp/utility/compare/weak_ordering). Note! This does not imply [´strong::equality´](#equality). @@ -354,7 +355,7 @@ define the macro `STRONG_TYPE_IMPORT_STD_LIBRARY=1`. * `strong::weakly_ordered_with` provides - operator '<=>' between the strong type and each of the types `Ts...`. + operator `<=>` between the strong type and each of the types `Ts...`. Note! While `Ts` can include other strong types, it cannot refer to the strong type being defined. Use [`strong::weakly_ordered`](#weakly_ordered) for that. The result is [`std::weak_ordering`](https://en.cppreference.com/w/cpp/utility/compare/weak_ordering) @@ -369,7 +370,8 @@ define the macro `STRONG_TYPE_IMPORT_STD_LIBRARY=1`. A number of small utilities are available directly in `strong_type/type.hpp`. * `strong::type` provides a non-member `swap()` function as a friend, which - swaps underlying values using. + swaps underlying values using [`std::swap`](https://en.cppreference.com/w/cpp/algorithm/swap) + or a specific swap function for the underlying type. * `strong::underlying_type` is `T` for `strong::type` and @@ -714,4 +716,4 @@ correctly. Those found to cause trouble are disabled for those versions. Discussions, pull-requests, flames are welcome. -[@bjorn_fahller](https://twitter.com/bjorn_fahller) +[https://fosstodon.org/@rollbear](https://fosstodon.org/@rollbear), [@rollbear.bsky.social](https://bsky.app/profile/rollbear.bsky.social)