From 44cd94ef93218ee3224285f3672e6a5875cee4f0 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 4 May 2024 04:44:23 +0300 Subject: [PATCH] Update documentation --- doc/uuid/design_notes.adoc | 4 ++-- doc/uuid/name_generator.adoc | 2 +- doc/uuid/name_generator_md5.adoc | 2 +- doc/uuid/name_generator_sha1.adoc | 2 +- doc/uuid/nil_generator.adoc | 2 +- doc/uuid/string_generator.adoc | 2 +- doc/uuid/uuid_clock.adoc | 15 +++++++++++---- 7 files changed, 18 insertions(+), 11 deletions(-) diff --git a/doc/uuid/design_notes.adoc b/doc/uuid/design_notes.adoc index 1e1d7de..b335f95 100644 --- a/doc/uuid/design_notes.adoc +++ b/doc/uuid/design_notes.adoc @@ -3,6 +3,6 @@ :idprefix: design_notes_ -The document, http://www.itu.int/ITU-T/studygroups/com17/oid/X.667-E.pdf, was used to design and implement the *boost::uuids::uuid* struct. +The document http://www.itu.int/ITU-T/studygroups/com17/oid/X.667-E.pdf was used to design and implement the `uuid` struct. -All functions are re-entrant. Classes are as thread-safe as an int. That is an instance can not be shared between threads without proper synchronization. +All functions are re-entrant. Classes are as thread-safe as an int. That is an instance cannot be shared between threads without proper synchronization. diff --git a/doc/uuid/name_generator.adoc b/doc/uuid/name_generator.adoc index 6773408..b7ae142 100644 --- a/doc/uuid/name_generator.adoc +++ b/doc/uuid/name_generator.adoc @@ -18,7 +18,7 @@ namespace uuids { using name_generator = name_generator_sha1; using name_generator_latest = name_generator_sha1; -}} //namespace boost::uuids +}} // namespace boost::uuids ---- This header makes `name_generator_sha1` and `name_generator_md5` available and declares the compatibility aliases `name_generator` and `name_generator_latest`. diff --git a/doc/uuid/name_generator_md5.adoc b/doc/uuid/name_generator_md5.adoc index 35a9927..89a29b9 100644 --- a/doc/uuid/name_generator_md5.adoc +++ b/doc/uuid/name_generator_md5.adoc @@ -29,7 +29,7 @@ public: uuid operator()( void const* buffer, std::size_t byte_count ) const noexcept; }; -}} //namespace boost::uuids +}} // namespace boost::uuids ---- === name_generator_md5 diff --git a/doc/uuid/name_generator_sha1.adoc b/doc/uuid/name_generator_sha1.adoc index aa53696..0d9f87a 100644 --- a/doc/uuid/name_generator_sha1.adoc +++ b/doc/uuid/name_generator_sha1.adoc @@ -29,7 +29,7 @@ public: uuid operator()( void const* buffer, std::size_t byte_count ) const noexcept; }; -}} //namespace boost::uuids +}} // namespace boost::uuids ---- === name_generator_sha1 diff --git a/doc/uuid/nil_generator.adoc b/doc/uuid/nil_generator.adoc index d1b3669..d2525f3 100644 --- a/doc/uuid/nil_generator.adoc +++ b/doc/uuid/nil_generator.adoc @@ -18,7 +18,7 @@ struct nil_generator uuid nil_uuid() noexcept; -}} //namespace boost::uuids +}} // namespace boost::uuids ---- === nil_generator diff --git a/doc/uuid/string_generator.adoc b/doc/uuid/string_generator.adoc index ac875b7..dda5a9d 100644 --- a/doc/uuid/string_generator.adoc +++ b/doc/uuid/string_generator.adoc @@ -24,7 +24,7 @@ struct string_generator uuid operator()( CharIterator begin, CharIterator end ) const; }; -}} //namespace boost::uuids +}} // namespace boost::uuids ---- === string_generator diff --git a/doc/uuid/uuid_clock.adoc b/doc/uuid/uuid_clock.adoc index bee940a..b0adfbe 100644 --- a/doc/uuid/uuid_clock.adoc +++ b/doc/uuid/uuid_clock.adoc @@ -23,8 +23,12 @@ public: static time_point now() noexcept; - static time_point from_sys( std::chrono::system_clock::time_point const& tp ) noexcept; - static std::chrono::system_clock::time_point to_sys( time_point const& tp ) noexcept; + template + static time_point from_sys( + std::chrono::time_point const& tp ) noexcept; + + static std::chrono::time_point + to_sys( time_point const& tp ) noexcept; static time_point from_timestamp( std::uint64_t timestamp ) noexcept; static std::uint64_t to_timestamp( time_point const& tp ) noexcept; @@ -48,7 +52,9 @@ Returns: :: The current system time (`std::chrono::system_clock::now()`, convert === from_sys ``` -static time_point from_sys( std::chrono::system_clock::time_point const& tp ) noexcept; +template + static time_point from_sys( + std::chrono::time_point const& tp ) noexcept; ``` Returns: :: The `uuid_clock::time_point` corresponding to `tp`. @@ -56,7 +62,8 @@ Returns: :: The `uuid_clock::time_point` corresponding to `tp`. === to_sys ``` -static std::chrono::system_clock::time_point to_sys( time_point const& tp ) noexcept; +static std::chrono::time_point + to_sys( time_point const& tp ) noexcept; ``` Returns: :: The `std::chrono::system_clock::time_point` corresponding to `tp`.