From f2cba301f1f41e5bf69c3099c0fd1206f6170c6b Mon Sep 17 00:00:00 2001 From: ThePhD Date: Tue, 13 Aug 2024 07:24:46 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=F0=9F=93=9D=20Completely?= =?UTF-8?q?=20fix=20up=20documentation=20on=20newer=20doxygen=20generators?= =?UTF-8?q?=20under=20newer=20rules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ⏱️ Fix up benchmark compilation errors and test proper macros - 👷‍♀️ Set up new CMake variables and dependencies for ICU & friends --- CMakeLists.txt | 25 +++----- benchmarks/CMakeLists.txt | 15 +++++ benchmarks/barrier/CMakeLists.txt | 17 +++++ benchmarks/conversion_speed/CMakeLists.txt | 7 ++- benchmarks/conversion_speed/source/iconv.cpp | 6 +- .../conversion_speed/source/iconv.init.cpp | 6 +- benchmarks/conversion_speed/source/icu.cpp | 4 -- .../conversion_speed/source/icu.init.cpp | 4 -- benchmarks/error_handling/CMakeLists.txt | 2 +- .../include/ztd/text/benchmarks/version.hpp | 20 +++--- documentation/CMakeLists.txt | 5 +- documentation/Doxyfile.in | 11 +++- .../source/api/encodings/encoding_scheme.rst | 4 +- .../source/api/is_state_complete.rst | 3 +- documentation/source/conf.py | 10 +-- .../design/lucky 7 extensions/injective.rst | 5 +- include/ztd/text/any_encoding.hpp | 11 +--- include/ztd/text/any_encoding_with.hpp | 9 +-- include/ztd/text/ascii.hpp | 10 --- include/ztd/text/basic_encoding_scheme.hpp | 3 +- include/ztd/text/basic_iconv.hpp | 7 --- include/ztd/text/char_predicates.hpp | 4 ++ include/ztd/text/ciscode_iterator.hpp | 7 --- include/ztd/text/ciscode_result.hpp | 7 --- include/ztd/text/ciscode_view.hpp | 7 --- include/ztd/text/code_point.hpp | 7 --- include/ztd/text/code_unit.hpp | 16 ----- include/ztd/text/count_result.hpp | 15 ++--- include/ztd/text/decode_iterator.hpp | 9 +-- include/ztd/text/decode_result.hpp | 18 ++---- include/ztd/text/decode_view.hpp | 7 --- include/ztd/text/default_encoding.hpp | 6 -- include/ztd/text/encode_iterator.hpp | 9 +-- include/ztd/text/encode_result.hpp | 17 ++--- include/ztd/text/encode_view.hpp | 7 --- include/ztd/text/encoding_error.hpp | 8 --- include/ztd/text/encoding_scheme.hpp | 8 --- .../text/error_handler_always_returns_ok.hpp | 6 -- include/ztd/text/execution.hpp | 7 --- include/ztd/text/impl/execution_cuchar.hpp | 63 +++++++------------ include/ztd/text/impl/execution_iconv.hpp | 4 +- include/ztd/text/impl/execution_mac_os.hpp | 7 --- .../ztd/text/impl/wide_execution_cwchar.hpp | 30 ++------- .../ztd/text/impl/wide_execution_iconv.hpp | 4 +- .../ztd/text/impl/wide_execution_iso10646.hpp | 7 --- .../ztd/text/impl/wide_execution_windows.hpp | 7 --- .../ztd/text/is_full_range_representable.hpp | 6 -- .../ztd/text/is_ignorable_error_handler.hpp | 6 -- include/ztd/text/is_input_error_skippable.hpp | 8 --- include/ztd/text/is_redundant.hpp | 6 -- .../ztd/text/is_transcoding_compatible.hpp | 6 -- include/ztd/text/is_unicode_encoding.hpp | 10 --- include/ztd/text/iso_8859_1.hpp | 7 --- include/ztd/text/max_units.hpp | 6 -- include/ztd/text/no_encoding.hpp | 7 --- include/ztd/text/no_normalization.hpp | 7 --- include/ztd/text/normalization_result.hpp | 8 --- include/ztd/text/normalized_iterator.hpp | 7 --- include/ztd/text/normalized_view.hpp | 7 --- include/ztd/text/propagate_recode_error.hpp | 7 +-- .../ztd/text/propagate_transcode_error.hpp | 33 ++++++---- include/ztd/text/recode_iterator.hpp | 13 +--- include/ztd/text/recode_result.hpp | 24 +++---- include/ztd/text/recode_view.hpp | 15 ++--- include/ztd/text/skip_input_error.hpp | 21 +++---- include/ztd/text/state.hpp | 16 ++--- include/ztd/text/transcode_iterator.hpp | 7 --- include/ztd/text/transcode_result.hpp | 24 +++---- include/ztd/text/transcode_view.hpp | 15 ++--- include/ztd/text/utf16.hpp | 7 --- include/ztd/text/utf32.hpp | 7 --- include/ztd/text/utf8.hpp | 16 +---- include/ztd/text/validate_result.hpp | 10 +-- include/ztd/text/wide_execution.hpp | 7 --- 74 files changed, 202 insertions(+), 582 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12a5ce30..98841a0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,11 +121,17 @@ option(ZTD_TEXT_READTHEDOCS "Whether or not we are building inside of ReadTheDoc option(ZTD_TEXT_TESTS "Enable build of tests" OFF) option(ZTD_TEXT_DOCUMENTATION "Enable build of documentation" OFF) option(ZTD_TEXT_DOCUMENTATION_NO_SPHINX "Turn off Sphinx usage (useful for ReadTheDocs builds)" OFF) +option(ZTD_TEXT_GENERATE_SINGLE "Enable generation of a single header and its target" OFF) +option(ZTD_TEXT_BOOST.TEXT "Enable Boost.Text-dependent benchmarking, examples, and similar if benchmarking and/or examples are turned on." OFF) +option(ZTD_TEXT_ICU "Enable ICU-dependent benchmarking, examples, and similar if benchmarking and/or examples are turned on." OFF) +option(ZTD_TEXT_LIBICONV "Enable libiconv-dependent benchmarking, examples, and similar if benchmarking and/or examples are turned on." OFF) option(ZTD_TEXT_EXAMPLES "Enable build of examples" OFF) +cmake_dependent_option(ZTD_TEXT_EXAMPLES_BOOST.TEXT "Enable usage of Boost.Text in examples" ON "ZTD_TEXT_EXAMPLES;ZTD_TEXT_BOOST.TEXT" OFF) option(ZTD_TEXT_BENCHMARKS "Enable build of benchmarks" OFF) -option(ZTD_TEXT_BENCHMARKS_INTERNALS "Enable benchmarking for basic and internal-specific functionality" OFF) -option(ZTD_TEXT_GENERATE_SINGLE "Enable generation of a single header and its target" OFF) -option(ZTD_TEXT_BOOST.TEXT "Enable usage of Boost.Text benchmarks and examples" OFF) +cmake_dependent_option(ZTD_TEXT_BENCHMARKS_INTERNALS "Enable benchmarking for basic and internal-specific functionality" ON "ZTD_TEXT_BENCHMARKS" OFF) +cmake_dependent_option(ZTD_TEXT_BENCHMARKS_BOOST.TEXT "Enable benchmarking for Boost.Text" ON "ZTD_TEXT_BENCHMARKS;ZTD_TEXT_BOOST.TEXT" OFF) +cmake_dependent_option(ZTD_TEXT_BENCHMARKS_ICU "Enable benchmarking for ICU" ON "ZTD_TEXT_BENCHMARKS;ZTD_TEXT_ICU" OFF) +cmake_dependent_option(ZTD_TEXT_BENCHMARKS_LIBICONV "Enable benchmarking for libiconv" ON "ZTD_TEXT_BENCHMARKS;ZTD_TEXT_LIBICONV" OFF) # # Dependencies # ztd.idk @@ -246,19 +252,6 @@ if (ZTD_TEXT_EXAMPLES OR ZTD_TEXT_BENCHMARKS) if (ZTD_TEXT_BOOST.TEXT) boost_text_dependency_jail() endif() - if (ZTD_TEXT_BENCHMARKS) - function(unicode_lipsum_dependency_jail) - # unicode_lipsum check - FetchContent_Declare( - unicode_lipsum - GIT_REPOSITORY https://github.com/lemire/unicode_lipsum - GIT_SHALLOW ON - GIT_TAG main - EXCLUDE_FROM_ALL) - FetchContent_MakeAvailable(unicode_lipsum) - endfunction() - unicode_lipsum_dependency_jail() - endif() endif() if(ZTD_TEXT_TESTS) diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index ca2bcf4f..a64bf0db 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -80,6 +80,21 @@ function (ctre_dependency_jail) endfunction() ctre_dependency_jail() +if (ZTD_TEXT_BENCHMARKS_ICU) + function(icu_cmake_dependency_jail) + FetchContent_Declare( + icu_cmake + GIT_REPOSITORY https://github.com/viaduck/icu-cmake + GIT_SHALLOW ON + GIT_TAG master + ) + set(BUILD_ICU ON) + set(ICU_BUILD_VERSION 74.2) + FetchContent_MakeAvailable(icu_cmake) + endfunction() + icu_cmake_dependency_jail() +endif() + function(ztd_platform_dependency_jail) # ztd.platform FetchContent_Declare( diff --git a/benchmarks/barrier/CMakeLists.txt b/benchmarks/barrier/CMakeLists.txt index d86bbcfa..91b5b267 100644 --- a/benchmarks/barrier/CMakeLists.txt +++ b/benchmarks/barrier/CMakeLists.txt @@ -27,6 +27,19 @@ # # =========================================================================== # +# # Benchmark dependecy data +function(unicode_lipsum_dependency_jail) + # unicode_lipsum check + FetchContent_Declare( + unicode_lipsum + GIT_REPOSITORY https://github.com/lemire/unicode_lipsum + GIT_SHALLOW ON + GIT_TAG main + EXCLUDE_FROM_ALL) + FetchContent_MakeAvailable(unicode_lipsum) +endfunction() +unicode_lipsum_dependency_jail() + # # Benchmarks data, compiled behind a shared data barrier file(GLOB_RECURSE ztd.text.benchmarks.barrier.sources LIST_DIRECTORIES FALSE @@ -44,6 +57,10 @@ add_library(ztd::text::benchmarks::barrier target_compile_definitions(ztd.text.benchmarks.barrier PRIVATE ZTD_TEXT_BENCHMARKS_BARRIER_BUILD=1 + ZTD_TEXT_BENCHMARKS_BARRIER_WIKIPEDIA_SOURCE_DIR="${UNICODE_LIPSUM_SOURCE_DIR}/wikipedia_mars/" + ZTD_TEXT_BENCHMARKS_BARRIER_WIKIPEDIA_SOURCE_LIST="${UNICODE_LIPSUM_SOURCE_DIR}/wikipedia_mars/" + ZTD_TEXT_BENCHMARKS_BARRIER_LIPSUM_SOURCE_DIR="${UNICODE_LIPSUM_SOURCE_DIR}/lipsum/" + ZTD_TEXT_BENCHMARKS_BARRIER_LIPSUM_SOURCE_DIR="${UNICODE_LIPSUM_SOURCE_DIR}/lipsum/" PUBLIC ZTD_TEXT_BENCHMARKS_BARRIER_DLL=1 ) diff --git a/benchmarks/conversion_speed/CMakeLists.txt b/benchmarks/conversion_speed/CMakeLists.txt index 873c32b0..60cd20ce 100644 --- a/benchmarks/conversion_speed/CMakeLists.txt +++ b/benchmarks/conversion_speed/CMakeLists.txt @@ -53,7 +53,8 @@ function (generate_converion_speed_benchmark_targets name data_name title) ztd::text ctre::ctre utf8cpp - $<$:Boost::text> + $<$:Boost::text> + $<$:icu> benchmark::benchmark ${CMAKE_DL_LIBS} ) @@ -94,8 +95,8 @@ function (generate_converion_speed_benchmark_targets name data_name title) ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_CUNEICODE_SINGLE_FROM_BULK_BENCHMARKS=$,1,0> ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_CUNEICODE_BASIC_UNCHECKED_BENCHMARKS=$,1,0> ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_CUNEICODE_SINGLE_FROM_BULK_UNCHECKED_BENCHMARKS=$,1,0> - ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICU_BENCHMARKS=$,1,0> - ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICONV_BENCHMARKS=$,1,0> + ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICU_BENCHMARKS=$,1,0> + ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_LIBICONV_BENCHMARKS=$,1,0> ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ENCODING_C_BENCHMARKS=1 ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_CTRE_BENCHMARKS=1 ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_SIMDUTF_BENCHMARKS=1 diff --git a/benchmarks/conversion_speed/source/iconv.cpp b/benchmarks/conversion_speed/source/iconv.cpp index 0229b222..d339ea58 100644 --- a/benchmarks/conversion_speed/source/iconv.cpp +++ b/benchmarks/conversion_speed/source/iconv.cpp @@ -29,12 +29,10 @@ #include -#if ZTD_IS_ON(ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICONV_BENCHMARKS) +#if ZTD_IS_ON(ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_LIBICONV_BENCHMARKS) #include -#if ZTD_IS_ON(ZTD_PLATFORM_LIBICONV) - #include #include @@ -167,5 +165,3 @@ BENCHMARK(utf32_to_utf8_well_formed_iconv); BENCHMARK(utf32_to_utf16_well_formed_iconv); #endif - -#endif diff --git a/benchmarks/conversion_speed/source/iconv.init.cpp b/benchmarks/conversion_speed/source/iconv.init.cpp index 7f05d4c7..fe6f00b6 100644 --- a/benchmarks/conversion_speed/source/iconv.init.cpp +++ b/benchmarks/conversion_speed/source/iconv.init.cpp @@ -29,12 +29,10 @@ #include -#if ZTD_IS_ON(ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICONV_BENCHMARKS) +#if ZTD_IS_ON(ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_LIBICONV_BENCHMARKS) #include -#if ZTD_IS_ON(ZTD_PLATFORM_LIBICONV) - #include #include @@ -168,5 +166,3 @@ BENCHMARK(utf32_to_utf8_init_well_formed_iconv); BENCHMARK(utf32_to_utf16_init_well_formed_iconv); #endif - -#endif diff --git a/benchmarks/conversion_speed/source/icu.cpp b/benchmarks/conversion_speed/source/icu.cpp index 5e623d92..0cece3d6 100644 --- a/benchmarks/conversion_speed/source/icu.cpp +++ b/benchmarks/conversion_speed/source/icu.cpp @@ -33,8 +33,6 @@ #include -#if ZTD_IS_ON(ZTD_PLATFORM_ICU) - #include #include @@ -399,5 +397,3 @@ BENCHMARK(utf32_to_utf16_well_formed_icu_u_strFromUTF32); BENCHMARK(utf32_to_utf16_well_formed_icu_ucnv_toUChars); #endif - -#endif diff --git a/benchmarks/conversion_speed/source/icu.init.cpp b/benchmarks/conversion_speed/source/icu.init.cpp index 793da8d1..31f2ca25 100644 --- a/benchmarks/conversion_speed/source/icu.init.cpp +++ b/benchmarks/conversion_speed/source/icu.init.cpp @@ -33,8 +33,6 @@ #include -#if ZTD_IS_ON(ZTD_PLATFORM_ICU) - #include #include @@ -144,5 +142,3 @@ BENCHMARK(utf32_to_utf8_init_well_formed_icu_ucnv_convertEx); BENCHMARK(utf32_to_utf16_init_well_formed_icu_ucnv_convertEx); #endif - -#endif diff --git a/benchmarks/error_handling/CMakeLists.txt b/benchmarks/error_handling/CMakeLists.txt index 8f485475..d4a96dc6 100644 --- a/benchmarks/error_handling/CMakeLists.txt +++ b/benchmarks/error_handling/CMakeLists.txt @@ -87,7 +87,7 @@ function (generate_converion_speed_benchmark_targets name data_name title) ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_ZTD_TEXT_BENCHMARKS=1 ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_CUNEICODE_BENCHMARKS=1 ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_ICU_BENCHMARKS=1 - ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_ICONV_BENCHMARKS=1 + ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_LIBICONV_BENCHMARKS=1 ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_ENCODING_C_BENCHMARKS=1 ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_WINDOWS_BENCHMARKS=1 _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING=1 diff --git a/benchmarks/include/ztd/text/benchmarks/version.hpp b/benchmarks/include/ztd/text/benchmarks/version.hpp index d05b0e7e..12652ded 100644 --- a/benchmarks/include/ztd/text/benchmarks/version.hpp +++ b/benchmarks/include/ztd/text/benchmarks/version.hpp @@ -126,14 +126,14 @@ #define ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ENCODING_C_BENCHMARKS_I_ ZTD_DEFAULT_ON #endif -#if defined(ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICONV_BENCHMARKS) -#if (ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICONV_BENCHMARKS != 0) -#define ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICONV_BENCHMARKS_I_ ZTD_ON +#if defined(ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_LIBICONV_BENCHMARKS) +#if (ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_LIBICONV_BENCHMARKS != 0) +#define ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_LIBICONV_BENCHMARKS_I_ ZTD_ON #else -#define ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICONV_BENCHMARKS_I_ ZTD_OFF +#define ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_LIBICONV_BENCHMARKS_I_ ZTD_OFF #endif #else -#define ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICONV_BENCHMARKS_I_ ZTD_DEFAULT_ON +#define ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_LIBICONV_BENCHMARKS_I_ ZTD_DEFAULT_ON #endif #if defined(ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICU_BENCHMARKS) @@ -327,14 +327,14 @@ #define ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_ENCODING_C_BENCHMARKS_I_ ZTD_DEFAULT_ON #endif -#if defined(ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_ICONV_BENCHMARKS) -#if (ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_ICONV_BENCHMARKS != 0) -#define ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_ICONV_BENCHMARKS_I_ ZTD_ON +#if defined(ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_LIBICONV_BENCHMARKS) +#if (ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_LIBICONV_BENCHMARKS != 0) +#define ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_LIBICONV_BENCHMARKS_I_ ZTD_ON #else -#define ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_ICONV_BENCHMARKS_I_ ZTD_OFF +#define ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_LIBICONV_BENCHMARKS_I_ ZTD_OFF #endif #else -#define ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_ICONV_BENCHMARKS_I_ ZTD_DEFAULT_ON +#define ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_LIBICONV_BENCHMARKS_I_ ZTD_DEFAULT_ON #endif #if defined(ZTD_TEXT_BENCHMARKS_ERROR_HANDLING_ICU_BENCHMARKS) diff --git a/documentation/CMakeLists.txt b/documentation/CMakeLists.txt index d2d7cbbc..fc864443 100644 --- a/documentation/CMakeLists.txt +++ b/documentation/CMakeLists.txt @@ -68,7 +68,8 @@ list(JOIN ztd_idk_doxygen_include_paths " " ztd_text_doxygen_include_paths) set(ZTD_TEXT_DOXYGEN_PROJECT_DESCRIPTION ${PROJECT_DESCRIPTION}) set(ZTD_TEXT_DOXYGEN_PROJECT_VERSION ${PROJECT_VERSION}) set(ZTD_TEXT_DOXYGEN_PROJECT_NAME ${PROJECT_NAME}) -set(ZTD_TEXT_DOXYGEN_INPUT ${ztd_text_doxygen_public_headers}) +#set(ZTD_TEXT_DOXYGEN_INPUT ${ztd_text_doxygen_public_headers}) +set(ZTD_TEXT_DOXYGEN_INPUT ${CMAKE_SOURCE_DIR}) set(ZTD_TEXT_DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/doxygen) set(ZTD_TEXT_DOXYGEN_XML_OUTPUT_DIR ${ZTD_TEXT_DOXYGEN_OUTPUT_DIR}/xml) set(ZTD_TEXT_DOXYGEN_HTML_OUTPUT_DIR ${ZTD_TEXT_DOXYGEN_OUTPUT_DIR}/html) @@ -120,7 +121,7 @@ if (NOT ZTD_TEXT_DOCUMENTATION_NO_SPHINX) COMMAND Sphinx::Build ARGS -b html - -Dbreathe_projects.ztd.text=${ZTD_TEXT_DOXYGEN_XML_OUTPUT_DIR} + -Dbreathe_projects.ztd_text=${ZTD_TEXT_DOXYGEN_XML_OUTPUT_DIR} ${ZTD_TEXT_SPHINX_SOURCE_DIR} ${ZTD_TEXT_SPHINX_BUILD_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} diff --git a/documentation/Doxyfile.in b/documentation/Doxyfile.in index 067b61ee..10097ab2 100644 --- a/documentation/Doxyfile.in +++ b/documentation/Doxyfile.in @@ -499,7 +499,7 @@ NUM_PROC_THREADS = 1 # normally produced when WARNINGS is set to YES. # The default value is: NO. -EXTRACT_ALL = YES +EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. @@ -1024,7 +1024,12 @@ EXCLUDE_SYMLINKS = NO # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = */detail/* \ - */vendor/* + */vendor/* \ + */tests/* \ + */single/* \ + */examples/* \ + */benchmarks/* \ + */documentation/* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -2236,7 +2241,7 @@ XML_PROGRAMLISTING = YES # The default value is: NO. # This tag requires that the tag GENERATE_XML is set to YES. -XML_NS_MEMB_FILE_SCOPE = NO +XML_NS_MEMB_FILE_SCOPE = YES #--------------------------------------------------------------------------- # Configuration options related to the DOCBOOK output diff --git a/documentation/source/api/encodings/encoding_scheme.rst b/documentation/source/api/encodings/encoding_scheme.rst index af61911b..87c8ca52 100644 --- a/documentation/source/api/encodings/encoding_scheme.rst +++ b/documentation/source/api/encodings/encoding_scheme.rst @@ -67,5 +67,5 @@ Aliases Base Template ------------- -.. doxygenclass:: ztd::text::encoding_scheme - :members: +.. doxygengroup:: ztd_text_encoding_scheme + :content-only: diff --git a/documentation/source/api/is_state_complete.rst b/documentation/source/api/is_state_complete.rst index ef7f36e1..03db48ad 100644 --- a/documentation/source/api/is_state_complete.rst +++ b/documentation/source/api/is_state_complete.rst @@ -31,4 +31,5 @@ is_state_complete ================= -.. doxygenfunction:: ztd::text::is_state_complete +.. doxygengroup:: ztd_text_is_state_complete + :content-only: diff --git a/documentation/source/conf.py b/documentation/source/conf.py index 08c96f93..570787c5 100644 --- a/documentation/source/conf.py +++ b/documentation/source/conf.py @@ -88,7 +88,7 @@ # Breathe Configuration # breathe_projects = {} -breathe_default_project = "ztd.text" +breathe_default_project = "ztd_text" # autosectionlabel Configuration # @@ -106,8 +106,8 @@ def run_cmake_doxygen(): xml_dir = os.path.join(cmake_dir, 'documentation/doxygen/xml') os.makedirs(cmake_dir, exist_ok=True) os.makedirs(xml_dir, exist_ok=True) - print("[ztd.text/documentation/conf.py] CMake Directory: %s" % cmake_dir) - print("[ztd.text/documentation/conf.py] XML Directory: %s" % xml_dir) + print("[ztd_text/documentation/conf.py] CMake Directory: %s" % cmake_dir) + print("[ztd_text/documentation/conf.py] XML Directory: %s" % xml_dir) try: retcode = subprocess.call( @@ -120,14 +120,14 @@ def run_cmake_doxygen(): try: retcode = subprocess.call( - "cmake --build . --target \"ztd.text.documentation.doxygen\"", + "cmake --build . --target \"ztd_text.documentation.doxygen\"", shell=True, cwd=cmake_dir) except OSError as e: sys.stderr.write("cmake generation execution failed: %s\n" % e) return - breathe_projects["ztd.text"] = xml_dir + breathe_projects["ztd_text"] = xml_dir def generate_doxygen_xml(app): diff --git a/documentation/source/design/lucky 7 extensions/injective.rst b/documentation/source/design/lucky 7 extensions/injective.rst index 7c8af213..e17a67bf 100644 --- a/documentation/source/design/lucky 7 extensions/injective.rst +++ b/documentation/source/design/lucky 7 extensions/injective.rst @@ -49,6 +49,7 @@ These two properties appear on the type itself, and is a way to opt-in to saying :emphasize-lines: 2-3 struct any_unicode_byte_encoding { + // … using is_decode_injective = std::true_type; using is_encode_injective = std::true_type; using code_unit = std::byte; @@ -61,7 +62,7 @@ This signals that the ``encode_one`` and ``decode_one`` functions — if they ar .. literalinclude:: /../../include/ztd/text/ascii.hpp :language: cpp :linenos: - :lines: 74-76,95-107,273 - :emphasize-lines: 4-16 + :lines: 53-54,71-81,246,248-255 + :emphasize-lines: 3-13 If the type definition is not present and is not ``std::true_type``, then the implementation assumes that this is false for a given encoding. See :doc:`ztd::text::is_decode_injective ` and :doc:`ztd::text::is_encode_injective ` for more information. diff --git a/include/ztd/text/any_encoding.hpp b/include/ztd/text/any_encoding.hpp index f1edc389..e61fc55d 100644 --- a/include/ztd/text/any_encoding.hpp +++ b/include/ztd/text/any_encoding.hpp @@ -43,11 +43,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - ////// /// @brief A type-erased encoding that uses the specified code unit, code point, and input/output ranges for the /// various operations. @@ -98,7 +93,7 @@ namespace ztd { namespace text { && !is_specialization_of_v, ::std::in_place_type_t>>* = nullptr> any_byte_encoding(_EncodingArg&& __encoding, _Args&&... __args) : any_byte_encoding(::std::in_place_type>, - ::std::forward<_EncodingArg>(__encoding), ::std::forward<_Args>(__args)...) { + ::std::forward<_EncodingArg>(__encoding), ::std::forward<_Args>(__args)...) { } ////// @@ -114,7 +109,7 @@ namespace ztd { namespace text { ::std::enable_if_t>>>* = nullptr> any_byte_encoding(::std::in_place_type_t<_EncodingArg>, _Args&&... __args) : __base_t(::std::in_place_type_t, endian::native, _Byte>> {}, - ::std::forward<_Args>(__args)...) { + ::std::forward<_Args>(__args)...) { } ////// @@ -166,8 +161,6 @@ namespace ztd { namespace text { /// ztd::text::encoding_scheme first. using any_encoding = any_byte_encoding<::std::byte>; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/any_encoding_with.hpp b/include/ztd/text/any_encoding_with.hpp index f84b3442..7585c7ea 100644 --- a/include/ztd/text/any_encoding_with.hpp +++ b/include/ztd/text/any_encoding_with.hpp @@ -66,11 +66,6 @@ namespace ztd { namespace text { } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - ////// /// @brief An encoding class which has the given encode output and input, as well as the decode input and output /// ranges, provided as fixed types alongside the maximum number of code units put in and pushed out. @@ -193,7 +188,7 @@ namespace ztd { namespace text { !is_specialization_of_v, ::std::in_place_type_t>>* = nullptr> any_encoding_with(_Encoding&& __encoding, _Args&&... __args) : any_encoding_with(::std::in_place_type>, ::std::forward<_Encoding>(__encoding), - ::std::forward<_Args>(__args)...) { + ::std::forward<_Args>(__args)...) { } ////// @@ -1031,8 +1026,6 @@ namespace ztd { namespace text { ::std::unique_ptr<__erased> _M_storage; }; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/ascii.hpp b/include/ztd/text/ascii.hpp index ea7efcb0..e40e2b35 100644 --- a/include/ztd/text/ascii.hpp +++ b/include/ztd/text/ascii.hpp @@ -42,11 +42,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - ////// /// @brief The American Standard Code for Information Exchange (ASCII) Encoding. /// @@ -250,7 +245,6 @@ namespace ztd { namespace text { } }; - ////// /// @brief The American Standard Code for Information Exchange (ASCII) Encoding. /// @@ -259,14 +253,10 @@ namespace ztd { namespace text { /// reason! using ascii_t = basic_ascii; - ////// /// @brief An instance of the ascii_t type for ease of use. inline constexpr ascii_t ascii = {}; - ////// - /// @} - ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/basic_encoding_scheme.hpp b/include/ztd/text/basic_encoding_scheme.hpp index 5a1a3b96..7a54b79c 100644 --- a/include/ztd/text/basic_encoding_scheme.hpp +++ b/include/ztd/text/basic_encoding_scheme.hpp @@ -51,8 +51,7 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ ////// - /// @addtogroup ztd_text_encodings Encodings - /// + /// @addtogroup ztd_text_encoding_scheme ztd::text::encoding_scheme /// @{ ////// diff --git a/include/ztd/text/basic_iconv.hpp b/include/ztd/text/basic_iconv.hpp index 0a00b79e..849a693c 100644 --- a/include/ztd/text/basic_iconv.hpp +++ b/include/ztd/text/basic_iconv.hpp @@ -53,11 +53,6 @@ namespace ztd { namespace text { ; } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - ////// /// @brief An encoding which is templated on code unit and code point and provides access to the `iconv` library. /// @@ -566,8 +561,6 @@ namespace ztd { namespace text { std::string _M_to_name; }; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/char_predicates.hpp b/include/ztd/text/char_predicates.hpp index 40466239..bda5a503 100644 --- a/include/ztd/text/char_predicates.hpp +++ b/include/ztd/text/char_predicates.hpp @@ -44,6 +44,8 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ + ////// + /// @brief Internal comparison structure. struct __equal_to_char_fn { ////// /// @brief Compares two objects using the `==` operator. @@ -84,6 +86,8 @@ namespace ztd { namespace text { /// ruin the comparison. This object can be passed as a parameter, even to templated functions. inline constexpr const __equal_to_char_fn equal_to_char = {}; + ////// + /// @brief Internal comparison structure. struct __not_equal_to_char_fn { ////// /// @brief Compares two objects using the `!=` operator. diff --git a/include/ztd/text/ciscode_iterator.hpp b/include/ztd/text/ciscode_iterator.hpp index f83d0a23..1dd6fc53 100644 --- a/include/ztd/text/ciscode_iterator.hpp +++ b/include/ztd/text/ciscode_iterator.hpp @@ -40,11 +40,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_ranges Ranges, Views, and Iterators - /// - /// @{ - ////// /// @copydoc ztd::text::recode_sentinel_t using ciscode_sentinel_t = recode_sentinel_t; @@ -56,8 +51,6 @@ namespace ztd { namespace text { using ciscode_iterator = recode_iterator<_FromEncoding, _ToEncoding, _Range, _FromErrorHandler, _ToErrorHandler, _FromState, _ToState>; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/ciscode_result.hpp b/include/ztd/text/ciscode_result.hpp index 5cbb805f..8ab3b3c3 100644 --- a/include/ztd/text/ciscode_result.hpp +++ b/include/ztd/text/ciscode_result.hpp @@ -42,11 +42,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_result Result Types - /// - /// @{ - ////// /// @copydoc ztd::text::stateless_recode_result template @@ -62,8 +57,6 @@ namespace ztd { namespace text { template using ciscode_result = recode_result<_Input, _Output, _FromState, _ToState, _Pivot>; - ////// - /// @} ///// ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ diff --git a/include/ztd/text/ciscode_view.hpp b/include/ztd/text/ciscode_view.hpp index 36a65b69..b184e297 100644 --- a/include/ztd/text/ciscode_view.hpp +++ b/include/ztd/text/ciscode_view.hpp @@ -44,11 +44,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_ranges Ranges, Views, and Iterators - /// - /// @{ - ////// /// @copydoc ztd::text::transcode_view template ; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/code_point.hpp b/include/ztd/text/code_point.hpp index 0ef70320..ecc7f001 100644 --- a/include/ztd/text/code_point.hpp +++ b/include/ztd/text/code_point.hpp @@ -59,10 +59,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_properties Property and Trait Helpers - /// @{ - ////// /// @brief Retrieves the code point type for the given type. template @@ -86,9 +82,6 @@ namespace ztd { namespace text { template inline static constexpr ::std::size_t max_code_points_v = _Type::max_code_points; - ////// - /// @} - ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/code_unit.hpp b/include/ztd/text/code_unit.hpp index 664fba89..f6e5ac79 100644 --- a/include/ztd/text/code_unit.hpp +++ b/include/ztd/text/code_unit.hpp @@ -42,18 +42,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_properties Property and Trait Helpers - /// - /// @brief Type-trait like properties and helpers, with `_t` ( @c the inner `type` type definition ) and `_v` ( the - /// inner `value` variable, typically an `inline constexpr bool` ). - /// - /// @remarks These should be the go-to way to reference necessary type and constant static data out of encoding - /// objects when not interfacing with the well-defined, guaranteed members. For example, directly accessing the @c - /// obj::code_unit type is not viable for many encoding types and it is best to go through here. - /// @{ - ///// - ////// /// @brief Retrieves the code unit type for the given type. template @@ -75,10 +63,6 @@ namespace ztd { namespace text { template inline static constexpr ::std::size_t max_code_units_v = remove_cvref_t<_Type>::max_code_units; - ////// - /// @} - ///// - namespace __txt_detail { template using __detect_code_unit_type = decltype(typename _Type::code_unit {}); diff --git a/include/ztd/text/count_result.hpp b/include/ztd/text/count_result.hpp index 8c55e8b6..d565f159 100644 --- a/include/ztd/text/count_result.hpp +++ b/include/ztd/text/count_result.hpp @@ -52,11 +52,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_result Result Types - /// - /// @{ - ////// /// @brief The result of counting operations (such as ztd_text_count_as_encoded and /// ztd_text_count_as_encoded) that specifically do not include a reference to the state. @@ -93,7 +88,7 @@ namespace ztd { namespace text { constexpr stateless_count_result( _ArgInput&& __input, ::std::size_t __count, encoding_error __error_code = encoding_error::ok) : stateless_count_result( - ::std::forward<_ArgInput>(__input), __count, __error_code, __error_code != encoding_error::ok) { + ::std::forward<_ArgInput>(__input), __count, __error_code, __error_code != encoding_error::ok) { } ////// @@ -151,7 +146,7 @@ namespace ztd { namespace text { constexpr count_result(_ArgInput&& __input, ::std::size_t __count, _ArgState&& __state, encoding_error __error_code = encoding_error::ok) : count_result(::std::forward<_ArgInput>(__input), __count, ::std::forward<_ArgState>(__state), __error_code, - __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { + __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { } ////// @@ -209,8 +204,8 @@ namespace ztd { namespace text { constexpr count_transcode_result(_ArgInput&& __input, ::std::size_t __count, _ArgFromState&& __from_state, _ArgToState&& __to_state, encoding_error __error_code = encoding_error::ok) : count_transcode_result(::std::forward<_ArgInput>(__input), __count, - ::std::forward<_ArgFromState>(__from_state), ::std::forward<_ArgToState>(__to_state), __error_code, - __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { + ::std::forward<_ArgFromState>(__from_state), ::std::forward<_ArgToState>(__to_state), __error_code, + __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { } ////// @@ -237,8 +232,6 @@ namespace ztd { namespace text { } }; - ////// - /// @} namespace __txt_detail { template diff --git a/include/ztd/text/decode_iterator.hpp b/include/ztd/text/decode_iterator.hpp index f4fc6194..be9f4b4d 100644 --- a/include/ztd/text/decode_iterator.hpp +++ b/include/ztd/text/decode_iterator.hpp @@ -45,11 +45,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_ranges Ranges, Views, and Iterators - /// - /// @{ - ////// /// @brief The decode sentinel to use as the `end` value for a ztd::text::decode_iterator. using decode_sentinel_t = __txt_detail::__encoding_sentinel_t; @@ -197,7 +192,7 @@ namespace ztd { namespace text { state_type __state) noexcept(::std::is_nothrow_constructible_v<__iterator_base_it, range_type, encoding_type, error_handler_type, state_type>) : __iterator_base_it( - ::std::move(__range), ::std::move(__encoding), ::std::move(__error_handler), ::std::move(__state)) { + ::std::move(__range), ::std::move(__encoding), ::std::move(__error_handler), ::std::move(__state)) { } ////// @@ -208,8 +203,6 @@ namespace ztd { namespace text { constexpr decode_iterator& operator=(decode_iterator&&) = default; }; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/decode_result.hpp b/include/ztd/text/decode_result.hpp index aefd2e4e..60028f67 100644 --- a/include/ztd/text/decode_result.hpp +++ b/include/ztd/text/decode_result.hpp @@ -57,12 +57,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_result Result Types - /// - /// @{ - ///// - ////// /// @brief The result of all decode operations from encoding objects and higher-level calls (such as /// ztd_text_decode). @@ -131,8 +125,8 @@ namespace ztd { namespace text { = encoding_error::ok) noexcept(noexcept(stateless_decode_result(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __error_code, __error_code != encoding_error::ok))) : stateless_decode_result(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), - __error_code, - __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { + __error_code, + __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { } ////// @@ -215,8 +209,8 @@ namespace ztd { namespace text { constexpr decode_result(_ArgInput&& __input, _ArgOutput&& __output, _ArgState&& __state, encoding_error __error_code = encoding_error::ok) : decode_result(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), - ::std::forward<_ArgState>(__state), __error_code, - __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { + ::std::forward<_ArgState>(__state), __error_code, + __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { } ////// @@ -235,7 +229,7 @@ namespace ztd { namespace text { constexpr decode_result(_ArgInput&& __input, _ArgOutput&& __output, _ArgState&& __state, encoding_error __error_code, ::std::size_t __error_count) : __base_t( - ::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __error_code, __error_count) + ::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __error_code, __error_count) , state(::std::forward<_ArgState>(__state)) { } }; @@ -258,8 +252,6 @@ namespace ztd { namespace text { using basic_decode_error_handler_for = _Function( const _Encoding&, span_decode_result_for<_Encoding>, ::ztd::span>)>; - ////// - /// @} ///// namespace __txt_detail { diff --git a/include/ztd/text/decode_view.hpp b/include/ztd/text/decode_view.hpp index 9465afc1..0f054316 100644 --- a/include/ztd/text/decode_view.hpp +++ b/include/ztd/text/decode_view.hpp @@ -52,11 +52,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_ranges Ranges, Views, and Iterators - /// - /// @{ - ////// /// @brief A view over a range of code points, presenting the code points as code units. Uses the `_Encoding` /// specified to do so. @@ -222,8 +217,6 @@ namespace ztd { namespace text { return decode_view<_Encoding, _Range, _ErrorHandler, _State>(::std::move(__it)); } - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/default_encoding.hpp b/include/ztd/text/default_encoding.hpp index 5e196729..7b22b1d3 100644 --- a/include/ztd/text/default_encoding.hpp +++ b/include/ztd/text/default_encoding.hpp @@ -138,10 +138,6 @@ namespace ztd { namespace text { }; } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_properties Property and Trait Helpers - /// - /// @{ ///// ////// @@ -206,8 +202,6 @@ namespace ztd { namespace text { template using default_consteval_code_point_encoding_t = typename default_consteval_code_point_encoding<_Type>::type; - ////// - /// @} ///// ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ diff --git a/include/ztd/text/encode_iterator.hpp b/include/ztd/text/encode_iterator.hpp index 20ff477f..d49acdf8 100644 --- a/include/ztd/text/encode_iterator.hpp +++ b/include/ztd/text/encode_iterator.hpp @@ -45,11 +45,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_ranges Ranges, Views, and Iterators - /// - /// @{ - ////// /// @brief The encode sentinel to use as the `end` value for a ztd::text::encode_iterator. using encode_sentinel_t = __txt_detail::__encoding_sentinel_t; @@ -196,7 +191,7 @@ namespace ztd { namespace text { state_type __state) noexcept(::std::is_nothrow_constructible_v<__iterator_base_it, range_type, encoding_type, error_handler_type, state_type>) : __iterator_base_it( - ::std::move(__range), ::std::move(__encoding), ::std::move(__error_handler), ::std::move(__state)) { + ::std::move(__range), ::std::move(__encoding), ::std::move(__error_handler), ::std::move(__state)) { } ////// @@ -207,8 +202,6 @@ namespace ztd { namespace text { constexpr encode_iterator& operator=(encode_iterator&&) = default; }; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/encode_result.hpp b/include/ztd/text/encode_result.hpp index 7c55149b..de6bed04 100644 --- a/include/ztd/text/encode_result.hpp +++ b/include/ztd/text/encode_result.hpp @@ -56,11 +56,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_result Result Types - /// - /// @{ - ////// /// @brief The result of all encode operations from encoding objects and higher-level calls (such as /// ztd_text_encode). @@ -130,8 +125,8 @@ namespace ztd { namespace text { = encoding_error::ok) noexcept(noexcept(stateless_encode_result(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __error_code, __error_code != encoding_error::ok))) : stateless_encode_result(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), - __error_code, - __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { + __error_code, + __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { } ////// @@ -215,8 +210,8 @@ namespace ztd { namespace text { constexpr encode_result(_ArgInput&& __input, _ArgOutput&& __output, _ArgState&& __state, encoding_error __error_code = encoding_error::ok) : encode_result(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), - ::std::forward<_ArgState>(__state), __error_code, - __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { + ::std::forward<_ArgState>(__state), __error_code, + __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { } ////// @@ -234,7 +229,7 @@ namespace ztd { namespace text { constexpr encode_result(_ArgInput&& __input, _ArgOutput&& __output, _ArgState&& __state, encoding_error __error_code, ::std::size_t __error_count) noexcept : __base_t( - ::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __error_code, __error_count) + ::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __error_code, __error_count) , state(::std::forward<_ArgState>(__state)) { } }; @@ -257,8 +252,6 @@ namespace ztd { namespace text { using basic_encode_error_handler_for = _Function( const _Encoding&, span_encode_result_for<_Encoding>, ::ztd::span>)>; - ////// - /// @} namespace __txt_detail { template diff --git a/include/ztd/text/encode_view.hpp b/include/ztd/text/encode_view.hpp index 9dcbb594..f67c53c5 100644 --- a/include/ztd/text/encode_view.hpp +++ b/include/ztd/text/encode_view.hpp @@ -51,11 +51,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_ranges Ranges, Views, and Iterators - /// - /// @{ - ////// /// @brief A view over a range of code points, presenting the code points as code units. Uses the `_Encoding` /// specified to do so. @@ -217,8 +212,6 @@ namespace ztd { namespace text { return encode_view<_Encoding, _Range, _ErrorHandler, _State>(::std::move(__it)); } - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/encoding_error.hpp b/include/ztd/text/encoding_error.hpp index 30f52931..c44d82e9 100644 --- a/include/ztd/text/encoding_error.hpp +++ b/include/ztd/text/encoding_error.hpp @@ -55,12 +55,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_encoding_error ztd::text::encoding_error - /// @brief This enumeration describes the kind of failures that can happen in ztd_text_transcode, - /// ztd_text_decode, ztd_text_encode, and lower-level operations. - /// @{ - ////// /// @brief Describes a failure to encode, decode, transcode, or count, for four core various reasons. /// @@ -160,8 +154,6 @@ namespace ztd { namespace text { return __category; } - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ diff --git a/include/ztd/text/encoding_scheme.hpp b/include/ztd/text/encoding_scheme.hpp index ec2a7092..8f1b8192 100644 --- a/include/ztd/text/encoding_scheme.hpp +++ b/include/ztd/text/encoding_scheme.hpp @@ -44,11 +44,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - ////// /// @brief A UTF-16 encoding, in Little Endian format, with inputs as a sequence of bytes. /// @@ -139,9 +134,6 @@ namespace ztd { namespace text { /// @brief An instance of the utf32_ne_t type for ease of use. inline constexpr utf32_ne_t utf32_ne = {}; - ////// - /// @} - ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/error_handler_always_returns_ok.hpp b/include/ztd/text/error_handler_always_returns_ok.hpp index 6feb61c8..c1db697a 100644 --- a/include/ztd/text/error_handler_always_returns_ok.hpp +++ b/include/ztd/text/error_handler_always_returns_ok.hpp @@ -121,10 +121,6 @@ namespace ztd { namespace text { } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_properties Property and Trait Helpers - /// - /// @{ ///// ////// @@ -163,8 +159,6 @@ namespace ztd { namespace text { inline constexpr bool encode_error_handler_always_returns_ok_v = encode_error_handler_always_returns_ok<_Encoding, _ErrorHandler>::value; - ////// - /// @} ///// ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ diff --git a/include/ztd/text/execution.hpp b/include/ztd/text/execution.hpp index 319da3ab..dfc73cb9 100644 --- a/include/ztd/text/execution.hpp +++ b/include/ztd/text/execution.hpp @@ -46,11 +46,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - ////// /// @brief The Encoding that represents the "Execution" (narrow locale-based) encoding. The encoding is /// typically associated with the locale, which is tied to the C standard library's setlocale function. @@ -79,8 +74,6 @@ namespace ztd { namespace text { /// @brief An instance of the execution_t type for ease of use. inline constexpr execution_t execution = {}; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/impl/execution_cuchar.hpp b/include/ztd/text/impl/execution_cuchar.hpp index 0c87b0ec..69f32e3a 100644 --- a/include/ztd/text/impl/execution_cuchar.hpp +++ b/include/ztd/text/impl/execution_cuchar.hpp @@ -87,12 +87,18 @@ namespace ztd { namespace text { ////// /// @brief Zero-initializes to its initial state, which includes the initial conversion sequence. __execution_decode_state() noexcept : __narrow_state(), __output_pending(false) { - ztd_char32_t __ghost_space[2]; - ::std::size_t __init_result = ZTD_UCHAR_SCOPE_I_ mbrtoc32(__ghost_space, "\0", 1, &__narrow_state); - // make sure it is initialized - ZTD_TEXT_ASSERT_I_(__init_result == 0 && __ghost_space[0] == U'\0'); ZTD_TEXT_ASSERT_I_(::std::mbsinit(&__narrow_state) != 0); } + + ////// + /// @brief Finds out whether or not the state contains any unused data that needs to complete an + /// indivisible unit of work. + /// + /// @returns Whether or not there are additional information stored in any part of the standard-based + /// streams have accumulated information for a continual decode operation. + bool is_complete() const noexcept { + return !this->__output_pending && (::std::mbsinit(&__narrow_state) != 0); + } }; class __execution_encode_state { @@ -107,20 +113,22 @@ namespace ztd { namespace text { ////// /// @brief Zero-initializes to its initial state, which includes the initial conversion sequence. __execution_encode_state() noexcept : __narrow_state(), __output_pending(false) { - char __ghost_space[MB_LEN_MAX]; - ::std::size_t __init_result = ZTD_UCHAR_SCOPE_I_ c32rtomb(__ghost_space, U'\0', &__narrow_state); - // make sure it is initialized - ZTD_TEXT_ASSERT_I_(__init_result == 1 && __ghost_space[0] == '\0'); - ZTD_TEXT_ASSERT_I_(::std::mbsinit(&__narrow_state) != 0); + ZTD_TEXT_ASSERT_I_(::std::mbsinit(&this->__narrow_state) != 0); + } + + + ////// + /// @brief Finds out whether or not the state contains any unused data that needs to complete an + /// indivisible unit of work. + /// + /// @returns Whether or not there are additional information stored in any part of the standard-based + /// streams have accumulated information for a continual encode operation. + bool is_complete() const noexcept { + return !this->__output_pending && (::std::mbsinit(&__narrow_state) != 0); } }; } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - namespace __txt_impl { ////// @@ -619,36 +627,9 @@ namespace ztd { namespace text { _SubOutput(::std::move(__out_it), ::std::move(__out_last)), __s, encoding_error::ok); } } - - ////// - /// @brief Finds out whether or not the state contains any unused data that needs to complete an - /// indivisible unit of work. - /// - /// @param[in] __state The decode state for the standard-API based wide execution encoding. - /// - /// @returns Whether or not there are additional information stored in any part of the standard-based - /// streams have accumulated information for a continual decode operation. - bool state_is_complete(const __txt_detail::__execution_decode_state& __state) const noexcept { - return !__state.__output_pending && ::ztd::text::is_state_complete(__state.__narrow_state); - } - - - ////// - /// @brief Finds out whether or not the state contains any unused data that needs to complete an - /// indivisible unit of work. - /// - /// @param[in] __state The encode state for the standard-API based wide execution encoding. - /// - /// @returns Whether or not there are additional information stored in any part of the standard-based - /// streams have accumulated information for a continual encode operation. - bool state_is_complete(const __txt_detail::__execution_encode_state& __state) const noexcept { - return !__state.__output_pending && ::ztd::text::is_state_complete(__state.__narrow_state); - } }; } // namespace __txt_impl - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/impl/execution_iconv.hpp b/include/ztd/text/impl/execution_iconv.hpp index 47436aad..c8e873bb 100644 --- a/include/ztd/text/impl/execution_iconv.hpp +++ b/include/ztd/text/impl/execution_iconv.hpp @@ -30,8 +30,8 @@ #pragma once -#ifndef ZTD_TEXT_DETAIL_EXECUTION_ICONV_HPP -#define ZTD_TEXT_DETAIL_EXECUTION_ICONV_HPP +#ifndef ZTD_TEXT_DETAIL_EXECUTION_LIBICONV_HPP +#define ZTD_TEXT_DETAIL_EXECUTION_LIBICONV_HPP #include diff --git a/include/ztd/text/impl/execution_mac_os.hpp b/include/ztd/text/impl/execution_mac_os.hpp index ab8d6e03..e197e339 100644 --- a/include/ztd/text/impl/execution_mac_os.hpp +++ b/include/ztd/text/impl/execution_mac_os.hpp @@ -53,11 +53,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - namespace __txt_impl { ////// @@ -158,8 +153,6 @@ namespace ztd { namespace text { } // namespace __txt_impl - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/impl/wide_execution_cwchar.hpp b/include/ztd/text/impl/wide_execution_cwchar.hpp index 2acac6e9..deb14f8f 100644 --- a/include/ztd/text/impl/wide_execution_cwchar.hpp +++ b/include/ztd/text/impl/wide_execution_cwchar.hpp @@ -74,17 +74,8 @@ namespace ztd { namespace text { ////// /// @brief Zero-initializes to its initial state, which includes the initial conversion sequence. __wide_execution_decode_state() noexcept : __wide_state(), __narrow_state() { - char __ghost_space[MB_LEN_MAX]; -#if ZTD_IS_ON(ZTD_LIBVCXX) - ::std::size_t __init_result {}; - errno_t err = wcrtomb_s(&__init_result, __ghost_space, MB_LEN_MAX, L'\0', &__wide_state); - ZTD_TEXT_ASSERT_I_(err == 0); -#else - ::std::size_t __init_result = ::std::wcrtomb(__ghost_space, L'\0', &__wide_state); -#endif // make sure it is initialized - ZTD_TEXT_ASSERT(__init_result == 1 && __ghost_space[0] == '\0'); - ZTD_TEXT_ASSERT(::std::mbsinit(&__wide_state) != 0); + ZTD_TEXT_ASSERT(::std::mbsinit(&this->__wide_state) != 0); } ////// @@ -94,7 +85,8 @@ namespace ztd { namespace text { /// @returns Whether or not there are additional information stored in any part of the standard-based /// streams have accumulated information for a continual decode operation. bool is_complete() const noexcept { - return ::std::mbsinit(&this->__wide_state) && ::ztd::text::is_state_complete(this->__narrow_state); + return (::std::mbsinit(&this->__wide_state) != 0) + && ::ztd::text::is_state_complete(this->__narrow_state); } }; @@ -110,11 +102,7 @@ namespace ztd { namespace text { ////// /// @brief Zero-initializes to its initial state, which includes the initial conversion sequence. __wide_execution_encode_state() noexcept : __wide_state(), __narrow_state() { - wchar_t __ghost_space[2]; - ::std::size_t __init_result = ::std::mbrtowc(__ghost_space, "", 1, &__wide_state); - // make sure it is initialized - ZTD_TEXT_ASSERT(__init_result == 0 && __ghost_space[0] == L'\0'); - ZTD_TEXT_ASSERT(::std::mbsinit(&__wide_state) != 0); + ZTD_TEXT_ASSERT(::std::mbsinit(&this->__wide_state) != 0); } @@ -125,16 +113,12 @@ namespace ztd { namespace text { /// @returns Whether or not there are additional information stored in any part of the standard-based /// streams have accumulated information for a continual encode operation. bool is_complete() const noexcept { - return ::std::mbsinit(&this->__wide_state) && ::ztd::text::is_state_complete(this->__narrow_state); + return (::std::mbsinit(&this->__wide_state) != 0) + && ::ztd::text::is_state_complete(this->__narrow_state); } }; } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - namespace __txt_impl { ////// @@ -477,8 +461,6 @@ namespace ztd { namespace text { }; } // namespace __txt_impl - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/impl/wide_execution_iconv.hpp b/include/ztd/text/impl/wide_execution_iconv.hpp index 67a5255b..e994a324 100644 --- a/include/ztd/text/impl/wide_execution_iconv.hpp +++ b/include/ztd/text/impl/wide_execution_iconv.hpp @@ -30,8 +30,8 @@ #pragma once -#ifndef ZTD_TEXT_DETAIL_WIDE_EXECUTION_ICONV_HPP -#define ZTD_TEXT_DETAIL_WIDE_EXECUTION_ICONV_HPP +#ifndef ZTD_TEXT_DETAIL_WIDE_EXECUTION_LIBICONV_HPP +#define ZTD_TEXT_DETAIL_WIDE_EXECUTION_LIBICONV_HPP #include diff --git a/include/ztd/text/impl/wide_execution_iso10646.hpp b/include/ztd/text/impl/wide_execution_iso10646.hpp index 589c0095..2bcad634 100644 --- a/include/ztd/text/impl/wide_execution_iso10646.hpp +++ b/include/ztd/text/impl/wide_execution_iso10646.hpp @@ -56,11 +56,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - namespace __txt_impl { ////// @@ -151,8 +146,6 @@ namespace ztd { namespace text { } // namespace __txt_impl - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/impl/wide_execution_windows.hpp b/include/ztd/text/impl/wide_execution_windows.hpp index d65cef22..d8d8d298 100644 --- a/include/ztd/text/impl/wide_execution_windows.hpp +++ b/include/ztd/text/impl/wide_execution_windows.hpp @@ -57,11 +57,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - namespace __txt_impl { ////// @@ -172,8 +167,6 @@ namespace ztd { namespace text { } // namespace __txt_impl - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/is_full_range_representable.hpp b/include/ztd/text/is_full_range_representable.hpp index bbb55baf..470bd991 100644 --- a/include/ztd/text/is_full_range_representable.hpp +++ b/include/ztd/text/is_full_range_representable.hpp @@ -78,10 +78,6 @@ namespace ztd { namespace text { : ::std::integral_constant { }; } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_properties Property and Trait Helpers - /// - /// @{ ///// ////// @@ -144,8 +140,6 @@ namespace ztd { namespace text { template inline constexpr bool is_full_range_representable_v = is_full_range_representable<_Type>::value; - ////// - /// @} ///// ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ diff --git a/include/ztd/text/is_ignorable_error_handler.hpp b/include/ztd/text/is_ignorable_error_handler.hpp index 179e23ca..6dd5aead 100644 --- a/include/ztd/text/is_ignorable_error_handler.hpp +++ b/include/ztd/text/is_ignorable_error_handler.hpp @@ -57,10 +57,6 @@ namespace ztd { namespace text { : public ::std::integral_constant { }; } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_properties Property and Trait Helpers - /// - /// @{ ////// /// @brief Whether or not the given `_Type` is an error handler that can be ignored. @@ -84,8 +80,6 @@ namespace ztd { namespace text { inline constexpr bool is_ignorable_error_handler_v = is_ignorable_error_handler<::ztd::remove_cvref_t<_Type>>::value; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/is_input_error_skippable.hpp b/include/ztd/text/is_input_error_skippable.hpp index ccf1cdd8..0a6e92cc 100644 --- a/include/ztd/text/is_input_error_skippable.hpp +++ b/include/ztd/text/is_input_error_skippable.hpp @@ -50,11 +50,6 @@ namespace ztd { namespace text { ::std::declval<_Result>(), ::std::declval<_InputProgress>(), ::std::declval<_OutputProgress>())); } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_properties Property and Trait Helpers - /// - /// @{ - ////// /// @brief Whether or not the given `_Encoding` has a function called `skip_input_error` that takes the given /// `_Result` type with the given `_InputProgress` and `_OutputProgress` types. @@ -79,9 +74,6 @@ namespace ztd { namespace text { inline constexpr bool is_input_error_skippable_v = is_input_error_skippable<_Encoding, _Result, _InputProgress, _OutputProgress>::value; - ////// - /// @} - ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/is_redundant.hpp b/include/ztd/text/is_redundant.hpp index c7f92682..c7f91966 100644 --- a/include/ztd/text/is_redundant.hpp +++ b/include/ztd/text/is_redundant.hpp @@ -70,10 +70,6 @@ namespace ztd { namespace text { && decoded_id_v<_ToEncoding> != ::ztd::text_encoding_id::unknown; } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_properties Property and Trait Helpers - /// - /// @{ ////// /// @brief Whether or not the decode encoding is @@ -96,8 +92,6 @@ namespace ztd { namespace text { inline constexpr bool is_encode_redundant_v = is_encode_redundant<::ztd::remove_cvref_t<_From>, ::ztd::remove_cvref_t<_To>>::value; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/is_transcoding_compatible.hpp b/include/ztd/text/is_transcoding_compatible.hpp index dd89b441..044b8e0a 100644 --- a/include/ztd/text/is_transcoding_compatible.hpp +++ b/include/ztd/text/is_transcoding_compatible.hpp @@ -73,10 +73,6 @@ namespace ztd { namespace text { } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_properties Property and Trait Helpers - /// - /// @{ ///// ////// @@ -130,8 +126,6 @@ namespace ztd { namespace text { template constexpr bool is_transcoding_compatible_v = is_transcoding_compatible<_To, _From>::value; - ////// - /// @} ///// ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ diff --git a/include/ztd/text/is_unicode_encoding.hpp b/include/ztd/text/is_unicode_encoding.hpp index fc9cebb4..89e4290d 100644 --- a/include/ztd/text/is_unicode_encoding.hpp +++ b/include/ztd/text/is_unicode_encoding.hpp @@ -67,12 +67,6 @@ namespace ztd { namespace text { : ::std::integral_constant { }; } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_properties Property and Trait Helpers - /// - /// @{ - ///// - ////// /// @brief Checks whether or not the encoding has declared it can handle all of Unicode. /// @@ -170,10 +164,6 @@ namespace ztd { namespace text { template inline constexpr text_encoding_id encoded_id_v = encoded_id<::ztd::remove_cvref_t<_Type>>::value; - ////// - /// @} - ///// - ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/iso_8859_1.hpp b/include/ztd/text/iso_8859_1.hpp index 7fbdea17..0218db3f 100644 --- a/include/ztd/text/iso_8859_1.hpp +++ b/include/ztd/text/iso_8859_1.hpp @@ -40,11 +40,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - ////// /// @brief The ISO/IEC 8859-1 encoding, occasionally referred to as Latin-1 (erroneously). Matches Unicode's /// encoding of the first 256 bytes one-to-one. @@ -253,8 +248,6 @@ namespace ztd { namespace text { /// @brief An instance of the basic_iso_8859_1 type for ease of use. inline constexpr basic_iso_8859_1 iso_8859_1 = {}; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/max_units.hpp b/include/ztd/text/max_units.hpp index f5781278..52e0913e 100644 --- a/include/ztd/text/max_units.hpp +++ b/include/ztd/text/max_units.hpp @@ -45,10 +45,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_properties Property and Trait Helpers - /// - /// @{ ///// ////// @@ -77,8 +73,6 @@ namespace ztd { namespace text { inline static constexpr ::std::size_t max_transcode_code_units_v = max_code_points_v<_From> * max_code_units_v<_To> * 2; - ////// - /// @} ///// ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ diff --git a/include/ztd/text/no_encoding.hpp b/include/ztd/text/no_encoding.hpp index ff897ee8..8428cbe5 100644 --- a/include/ztd/text/no_encoding.hpp +++ b/include/ztd/text/no_encoding.hpp @@ -51,11 +51,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - ////// /// @brief A UTF-32 Encoding that traffics in, specifically, the desired code unit type provided as a template /// argument. @@ -236,8 +231,6 @@ namespace ztd { namespace text { /// @brief An object for the ztd::text::no_codepoint_encoding_t type. inline constexpr no_codepoint_encoding_t no_codepoint_encoding = {}; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/no_normalization.hpp b/include/ztd/text/no_normalization.hpp index 2a4bc6f0..4ac39eca 100644 --- a/include/ztd/text/no_normalization.hpp +++ b/include/ztd/text/no_normalization.hpp @@ -47,11 +47,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_normalization Normalization - /// - /// @{ - ////// /// @brief A normalization form that does nothing. class no_normalization { @@ -96,8 +91,6 @@ namespace ztd { namespace text { } }; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/normalization_result.hpp b/include/ztd/text/normalization_result.hpp index b21a5a05..02456ee3 100644 --- a/include/ztd/text/normalization_result.hpp +++ b/include/ztd/text/normalization_result.hpp @@ -45,11 +45,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_normalization Normalization - /// - /// @{ - ////// /// @brief The result of an normalization operation. enum class normalization_error { @@ -95,9 +90,6 @@ namespace ztd { namespace text { } }; - ////// - /// @} - ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ diff --git a/include/ztd/text/normalized_iterator.hpp b/include/ztd/text/normalized_iterator.hpp index ab2d340a..cc43802b 100644 --- a/include/ztd/text/normalized_iterator.hpp +++ b/include/ztd/text/normalized_iterator.hpp @@ -69,11 +69,6 @@ namespace ztd { namespace text { using __default_normal_storage_t = typename __default_normal_storage<_Range, _NormalizationForm>::type; } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_ranges Ranges, Views, and Iterators - /// - /// @{ - using normalized_sentinel_t = ranges::default_sentinel_t; ////// @@ -245,8 +240,6 @@ namespace ztd { namespace text { unsigned char _M_cursor = 0; }; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/normalized_view.hpp b/include/ztd/text/normalized_view.hpp index 8eec6ab8..ce1ffe96 100644 --- a/include/ztd/text/normalized_view.hpp +++ b/include/ztd/text/normalized_view.hpp @@ -46,11 +46,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_ranges Ranges, Views, and Iterators - /// - /// @{ - template >>> class normalized_view { @@ -151,8 +146,6 @@ namespace ztd { namespace text { iterator _M_it; }; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/propagate_recode_error.hpp b/include/ztd/text/propagate_recode_error.hpp index ce430453..662b98e3 100644 --- a/include/ztd/text/propagate_recode_error.hpp +++ b/include/ztd/text/propagate_recode_error.hpp @@ -252,7 +252,7 @@ namespace ztd { namespace text { /// @param[in] __output The output view to be writing into. /// @param[in] __from_encoding The desired encoding that performs the decode portion of the transcoding step. /// @param[in] __to_encoding The desired encoding that performs the decode portion of the transcoding step. - /// @param[in] __result The result value that has an error in it. + /// @param[in] __encode_result The result value that has an error in it. /// @param[in] __encode_error_handler The error handler to mill the `__result` and /// other relevant information through. /// @param[in] __decode_error_handler The error handler to mill the `__encode_error_handler`'s invoked result and @@ -314,7 +314,7 @@ namespace ztd { namespace text { /// @param[in] __output The output view to be writing into. /// @param[in] __from_encoding The desired encoding that performs the decode portion of the transcoding step. /// @param[in] __to_encoding The desired encoding that performs the decode portion of the transcoding step. - /// @param[in] __result The result value that has an error in it. + /// @param[in] __encode_result The result value that has an error in it. /// @param[in] __encode_error_handler The error handler to mill the `__result` and /// other relevant information through. /// @param[in] __decode_error_handler The error handler to mill the `__encode_error_handler`'s invoked result and @@ -370,7 +370,6 @@ namespace ztd { namespace text { /// @param[in] __decode_result The result value that has an error on it. /// @param[in] __decode_error_handler The error handler to mill the `__result` and other relevant information /// through. - /// @param[in] __to_state The current state of the encoding step of the recode operation. /// @param[in] __to_input_progress Any unread output characters in any intermediate between the (failed) encode and /// decode operations. /// @param[in] __to_output_progress Any unread output characters in any intermediates between the (failed) encode @@ -410,7 +409,6 @@ namespace ztd { namespace text { /// @param[in] __decode_result The result value that has an error on it. /// @param[in] __decode_error_handler The error handler to mill the `__result` and other relevant information /// through. - /// @param[in] __to_state The current state of the encoding step of the recode operation. /// @param[in] __to_input_progress Any unread output characters in any intermediate between the (failed) encode and /// decode operations. /// @param[in] __to_output_progress Any unread output characters in any intermediates between the (failed) encode @@ -439,7 +437,6 @@ namespace ztd { namespace text { } ////// - /// /// @} diff --git a/include/ztd/text/propagate_transcode_error.hpp b/include/ztd/text/propagate_transcode_error.hpp index 76db9ba1..5a51e6d7 100644 --- a/include/ztd/text/propagate_transcode_error.hpp +++ b/include/ztd/text/propagate_transcode_error.hpp @@ -62,7 +62,7 @@ namespace ztd { namespace text { /// @param[in] __output The output view to be writing into. /// @param[in] __from_encoding The desired encoding that performs the encode portion of the transcoding step. /// @param[in] __to_encoding The desired encoding that performs the encode portion of the transcoding step. - /// @param[in] __result The result value that has an error in it. + /// @param[in] __decode_result The result value that has an error in it. /// @param[in] __decode_error_handler The error handler to mill the `__result` and /// other relevant information through. /// @param[in] __encode_error_handler The error handler to mill the `__decode_error_handler`'s invoked result and @@ -122,12 +122,16 @@ namespace ztd { namespace text { /// @param[in] __output The output view to be writing into. /// @param[in] __from_encoding The desired encoding that performs the encode portion of the transcoding step. /// @param[in] __to_encoding The desired encoding that performs the encode portion of the transcoding step. - /// @param[in] __result The result value that has an error in it. + /// @param[in] __decode_result The result value that has an error in it. /// @param[in] __decode_error_handler The error handler to mill the `__result` and /// other relevant information through. /// @param[in] __encode_error_handler The error handler to mill the `__decode_error_handler`'s invoked result and /// other relevant information through. /// @param[in] __to_state The current state of the encoding step of the transcode operation. + /// @param[in] __from_input_progress Any unread input characters in any intermediate between the (failed) encode + /// and decode operations. + /// @param[in] __from_output_progress Any unread intermediate output characters in any intermediates between the + /// (failed) encode and decode operations. /// @param[in] __to_input_progress Any unread output characters in any intermediate between the (failed) decode and /// encode operations. /// @param[in] __to_output_progress Any unread output characters in any intermediates between the (failed) decode @@ -166,12 +170,11 @@ namespace ztd { namespace text { /// /// @tparam _Result The exact transcode result type to use. /// - /// @param[in] __output The output view to be writing into. /// @param[in] __to_encoding The desired encoding that performs the encode portion of the transcoding step. - /// @param[in] __result The result value that has an error on it. + /// @param[in] __decode_result The result value that has an error on it. + /// @param[in] __encode_result The result value that has an error on it. /// @param[in] __encode_error_handler The error handler to mill the `__result` and other relevant information /// through. - /// @param[in] __to_state The current state of the encoding step of the transcode operation. /// @param[in] __to_input_progress Any unread output characters in any intermediate between the (failed) decode and /// encode operations. /// @param[in] __to_output_progress Any unread output characters in any intermediates between the (failed) decode @@ -205,14 +208,12 @@ namespace ztd { namespace text { /// ztd::text::decode_result through it, producing a ztd::text::encode_result and transforming that into the /// desired ztd::text::transcode_result type. /// - /// @param[in] __output The output view to be writing into. /// @param[in] __to_encoding The desired encoding that performs the encode portion of the transcoding step. /// @param[in] __decode_result The decode result value that has an error on it. /// @param[in] __encode_result The encode result value that represents what the next step would be if the decode /// did not work. /// @param[in] __encode_error_handler The error handler to mill the `__result` and other relevant information /// through. - /// @param[in] __to_state The current state of the encoding step of the transcode operation. /// @param[in] __to_input_progress Any unread output characters in any intermediate between the (failed) decode and /// encode operations. /// @param[in] __to_output_progress Any unread output characters in any intermediates between the (failed) decode @@ -248,6 +249,7 @@ namespace ztd { namespace text { /// /// @tparam _Result The exact transcode result type to use. /// + /// @param[in] __input The input view to be reading from. /// @param[in] __output The output view to be writing into. /// @param[in] __from_encoding The desired encoding that performs the encode portion of the transcoding step. /// @param[in] __to_encoding The desired encoding that performs the encode portion of the transcoding step. @@ -257,6 +259,10 @@ namespace ztd { namespace text { /// @param[in] __encode_error_handler The error handler to mill the `__decode_error_handler`'s invoked result and /// other relevant information through. /// @param[in] __to_state The current state of the encoding step of the transcode operation. + /// @param[in] __from_input_progress Any unread output characters in any intermediate between the (failed) decode + /// and encode operations. + /// @param[in] __from_output_progress Any unread output characters in any intermediates between the (failed) decode + /// and encode operations. /// @param[in] __to_input_progress Any unread output characters in any intermediate between the (failed) decode and /// encode operations. /// @param[in] __to_output_progress Any unread output characters in any intermediates between the (failed) decode @@ -305,6 +311,7 @@ namespace ztd { namespace text { /// /// @tparam _Result The exact transcode result type to use. /// + /// @param[in] __input The input view to be reading from. /// @param[in] __output The output view to be writing into. /// @param[in] __from_encoding The desired encoding that performs the encode portion of the transcoding step. /// @param[in] __to_encoding The desired encoding that performs the encode portion of the transcoding step. @@ -314,6 +321,10 @@ namespace ztd { namespace text { /// @param[in] __encode_error_handler The error handler to mill the `__decode_error_handler`'s invoked result and /// other relevant information through. /// @param[in] __to_state The current state of the encoding step of the transcode operation. + /// @param[in] __from_input_progress Any unread output characters in any intermediate between the (failed) decode + /// and encode operations. + /// @param[in] __from_output_progress Any unread output characters in any intermediates between the (failed) decode + /// and encode operations. /// @param[in] __to_input_progress Any unread output characters in any intermediate between the (failed) decode and /// encode operations. /// @param[in] __to_output_progress Any unread output characters in any intermediates between the (failed) decode @@ -354,13 +365,12 @@ namespace ztd { namespace text { /// /// @tparam _Result The exact transcode result type to use. /// - /// @param[in] __output The output view to be writing into. + /// @param[in] __input The input view to be reading from. /// @param[in] __to_encoding The desired encoding that performs the encode portion of the transcoding step. /// @param[in] __decode_result The decode result value that has an error on it. /// @param[in] __encode_result The encode result value that represents . /// @param[in] __encode_error_handler The error handler to mill the `__result` and other relevant information /// through. - /// @param[in] __to_state The current state of the encoding step of the transcode operation. /// @param[in] __to_input_progress Any unread output characters in any intermediate between the (failed) decode and /// encode operations. /// @param[in] __to_output_progress Any unread output characters in any intermediates between the (failed) decode @@ -394,14 +404,12 @@ namespace ztd { namespace text { /// ztd::text::decode_result through it, producing a ztd::text::encode_result and transforming that into the /// desired ztd::text::transcode_result type. /// - /// @param[in] __output The input view to be reading from. - /// @param[in] __output The output view to be writing into. + /// @param[in] __input The input view to be reading from. /// @param[in] __to_encoding The desired encoding that performs the encode portion of the transcoding step. /// @param[in] __decode_result The decode result value that has an error on it. /// @param[in] __encode_result The encode result value that represents . /// @param[in] __encode_error_handler The error handler to mill the `__result` and other relevant information /// through. - /// @param[in] __to_state The current state of the encoding step of the transcode operation. /// @param[in] __to_input_progress Any unread output characters in any intermediate between the (failed) decode and /// encode operations. /// @param[in] __to_output_progress Any unread output characters in any intermediates between the (failed) decode @@ -430,7 +438,6 @@ namespace ztd { namespace text { } ////// - /// /// @} diff --git a/include/ztd/text/recode_iterator.hpp b/include/ztd/text/recode_iterator.hpp index 588124f9..cc0ae06e 100644 --- a/include/ztd/text/recode_iterator.hpp +++ b/include/ztd/text/recode_iterator.hpp @@ -52,11 +52,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_ranges Ranges, Views, and Iterators - /// - /// @{ - ////// /// @brief A sentinel type that can be used to compare with a ztd::text::recode_iterator. using recode_sentinel_t = __txt_detail::__encoding_sentinel_t; @@ -246,7 +241,7 @@ namespace ztd { namespace text { constexpr recode_iterator( range_type __range, from_encoding_type __from_encoding, to_encoding_type __to_encoding) : recode_iterator(::std::move(__range), ::std::move(__from_encoding), ::std::move(__to_encoding), - from_error_handler_type {}, to_error_handler_type {}) { + from_error_handler_type {}, to_error_handler_type {}) { } ////// @@ -261,8 +256,8 @@ namespace ztd { namespace text { to_encoding_type __to_encoding, from_error_handler_type __from_error_handler, to_error_handler_type __to_error_handler) : recode_iterator(::std::move(__range), ::std::move(__from_encoding), ::std::move(__to_encoding), - ::std::move(__from_error_handler), ::std::move(__to_error_handler), from_state_type {}, - to_state_type {}) { + ::std::move(__from_error_handler), ::std::move(__to_error_handler), from_state_type {}, + to_state_type {}) { } ////// @@ -607,8 +602,6 @@ namespace ztd { namespace text { ::std::array _M_cache; }; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/recode_result.hpp b/include/ztd/text/recode_result.hpp index 3b86632b..ddea6b30 100644 --- a/include/ztd/text/recode_result.hpp +++ b/include/ztd/text/recode_result.hpp @@ -55,14 +55,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_result Result Types - /// - /// @brief The result types are used in the transcoding, validation and counting functions. Their sole goal is to - /// make sure. - /// - /// @{ - ////// /// @brief The result of transcoding operations (such as ztd::text::recode) that specifically do not include /// a reference to the state. @@ -134,7 +126,7 @@ namespace ztd { namespace text { = encoding_error::ok) noexcept(noexcept(stateless_recode_result(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __error_code, __error_code != encoding_error::ok))) : stateless_recode_result(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), - __error_code, __error_code != encoding_error::ok) { + __error_code, __error_code != encoding_error::ok) { } ////// @@ -233,8 +225,8 @@ namespace ztd { namespace text { constexpr pivotless_recode_result(_ArgInput&& __input, _ArgOutput&& __output, _ArgFromState&& __from_state, _ArgToState&& __to_state, encoding_error __error_code = encoding_error::ok) : pivotless_recode_result(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), - ::std::forward<_ArgFromState>(__from_state), ::std::forward<_ArgToState>(__to_state), __error_code, - __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { + ::std::forward<_ArgFromState>(__from_state), ::std::forward<_ArgToState>(__to_state), __error_code, + __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { } ////// @@ -256,7 +248,7 @@ namespace ztd { namespace text { constexpr pivotless_recode_result(_ArgInput&& __input, _ArgOutput&& __output, _ArgFromState&& __from_state, _ArgToState&& __to_state, encoding_error __error_code, ::std::size_t __error_count) : __base_t( - ::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __error_code, __error_count) + ::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __error_code, __error_count) , from_state(::std::forward<_ArgFromState>(__from_state)) , to_state(::std::forward<_ArgToState>(__to_state)) { } @@ -295,7 +287,7 @@ namespace ztd { namespace text { __other) noexcept(__txt_detail::__result_type_copy_noexcept<::ztd::text::recode_result, _Input, _ArgInput, _Output, _ArgOutput, _FromState, _ArgFromState, _ToState, _ArgToState, _Pivot, _ArgPivot>()) : __base_t(__other.input, __other.output, __other.error_code, __other.error_count, __other.from_state, - __other.to_state) + __other.to_state) , pivot(__other.pivot) , pivot_error_code(__other.pivot_error_code) , pivot_error_count(__other.pivot_error_count) { @@ -314,7 +306,7 @@ namespace ztd { namespace text { __other) noexcept(__txt_detail::__result_type_move_noexcept<::ztd::text::recode_result, _Input, _ArgInput, _Output, _ArgOutput, _FromState, _ArgFromState, _ToState, _ArgToState, _Pivot, _ArgPivot>()) : __base_t(::std::move(__other.input), ::std::move(__other.output), __other.error_code, __other.error_count, - __other.from_state, __other.to_state) + __other.from_state, __other.to_state) , pivot(::std::move(__other.pivot)) , pivot_error_code(::std::move(__other.pivot_error_code)) , pivot_error_count(::std::move(__other.pivot_error_count)) { @@ -347,15 +339,13 @@ namespace ztd { namespace text { _ArgToState&& __to_state, encoding_error __error_code, ::std::size_t __error_count, _ArgPivot&& __pivot, encoding_error __pivot_error_code, ::std::size_t __pivot_error_count) : __base_t(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __from_state, __to_state, - __error_code, __error_count) + __error_code, __error_count) , pivot(::std::forward<_ArgPivot>(__pivot)) , pivot_error_code(::std::move(__pivot_error_code)) , pivot_error_count(::std::move(__pivot_error_count)) { } }; - ////// - /// @} ///// namespace __txt_detail { diff --git a/include/ztd/text/recode_view.hpp b/include/ztd/text/recode_view.hpp index bf5878e8..37327adf 100644 --- a/include/ztd/text/recode_view.hpp +++ b/include/ztd/text/recode_view.hpp @@ -51,11 +51,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_ranges Ranges, Views, and Iterators - /// - /// @{ - ////// /// @brief A recoding iterator that takes an input of code units and provides an output over the code units of /// the desired `_ToEncoding` after converting from the `_FromEncoding` in a fashion that will never produce a @@ -138,7 +133,7 @@ namespace ztd { namespace text { constexpr recode_view( range_type __range, from_encoding_type __from_encoding, to_encoding_type __to_encoding) noexcept : recode_view(::std::move(__range), ::std::move(__from_encoding), ::std::move(__to_encoding), - from_error_handler_type {}, to_error_handler_type {}) { + from_error_handler_type {}, to_error_handler_type {}) { } ////// @@ -152,7 +147,7 @@ namespace ztd { namespace text { constexpr recode_view(range_type __range, from_encoding_type __from_encoding, to_encoding_type __to_encoding, from_error_handler_type __from_error_handler, to_error_handler_type __to_error_handler) noexcept : _M_it(::std::move(__range), ::std::move(__from_encoding), ::std::move(__to_encoding), - ::std::move(__from_error_handler), ::std::move(__to_error_handler)) { + ::std::move(__from_error_handler), ::std::move(__to_error_handler)) { } ////// @@ -169,8 +164,8 @@ namespace ztd { namespace text { from_error_handler_type __from_error_handler, to_error_handler_type __to_error_handler, from_state_type __from_state, to_state_type __to_state) noexcept : _M_it(::std::move(__range), ::std::move(__from_encoding), ::std::move(__to_encoding), - ::std::move(__from_error_handler), ::std::move(__to_error_handler), ::std::move(__from_state), - ::std::move(__to_state)) { + ::std::move(__from_error_handler), ::std::move(__to_error_handler), ::std::move(__from_state), + ::std::move(__to_state)) { } ////// @@ -206,8 +201,6 @@ namespace ztd { namespace text { iterator _M_it; }; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/skip_input_error.hpp b/include/ztd/text/skip_input_error.hpp index cc1adf6c..13010209 100644 --- a/include/ztd/text/skip_input_error.hpp +++ b/include/ztd/text/skip_input_error.hpp @@ -60,11 +60,6 @@ namespace ztd { namespace text { } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_properties Property and Trait Helpers - /// - /// @{ - ////// /// @brief Checks whether calling ztd::text::skip_input_error is an exceptionless operation. /// @@ -101,8 +96,8 @@ namespace ztd { namespace text { using _State = ::std::remove_reference_t<::ztd::unwrap_t<::ztd::remove_cvref_t>>; using _ReconstructedInput = ::ztd::ranges::reconstruct_t<_UInput, decltype(__it)&&, decltype(__last)&&>; using _ResultType = ::std::conditional_t<::ztd::is_specialization_of_v<_Result, decode_result>, - decode_result<_ReconstructedInput, _Output, _State>, - encode_result<_ReconstructedInput, _Output, _State>>; + decode_result<_ReconstructedInput, _Output, _State>, + encode_result<_ReconstructedInput, _Output, _State>>; if (__it != __last) { // if there is already some items in the input progress (things irreversibly read), then // we are not obligated to do "at least" one skip; barrier it behind an empty check for @@ -145,8 +140,8 @@ namespace ztd { namespace text { using _State = ::std::remove_reference_t<::ztd::unwrap_t<::ztd::remove_cvref_t>>; using _ReconstructedInput = ::ztd::ranges::reconstruct_t<_UInput, decltype(__it)&&, decltype(__last)&&>; using _ResultType = ::std::conditional_t<::ztd::is_specialization_of_v<_Result, decode_result>, - decode_result<_ReconstructedInput, _Output, _State>, - encode_result<_ReconstructedInput, _Output, _State>>; + decode_result<_ReconstructedInput, _Output, _State>, + encode_result<_ReconstructedInput, _Output, _State>>; if (__it != __last) { // if there is already some items in the input progress (things irreversibly read), then // we are not obligated to do "at least" one skip; barrier it behind an empty check for @@ -210,8 +205,8 @@ namespace ztd { namespace text { = ::std::remove_reference_t<::ztd::unwrap_t<::ztd::remove_cvref_t>>; using _ReconstructedInput = ::ztd::ranges::reconstruct_t<_UInput, decltype(__it)&&, decltype(__last)&&>; using _ResultType = ::std::conditional_t<::ztd::is_specialization_of_v<_Result, decode_result>, - decode_result<_ReconstructedInput, _Output, _State>, - encode_result<_ReconstructedInput, _Output, _State>>; + decode_result<_ReconstructedInput, _Output, _State>, + encode_result<_ReconstructedInput, _Output, _State>>; if (__it != __last) { // if there is already some items in the input progress (things irreversibly read), then // we are not obligated to do "at least" one skip; barrier it behind an empty check before making @@ -225,6 +220,10 @@ namespace ztd { namespace text { } } + ////// + /// @addtogroup ztd_text_skip_input_error ztd::text::skip_input_error + /// @{ + ////// /// @} diff --git a/include/ztd/text/state.hpp b/include/ztd/text/state.hpp index 6aef889d..8b2f09c0 100644 --- a/include/ztd/text/state.hpp +++ b/include/ztd/text/state.hpp @@ -72,16 +72,6 @@ namespace ztd { namespace text { } // namespace __txt_detail - ////// - /// @addtogroup ztd_text_state Encoding State Management - /// - /// @brief These allow a person to inspect the state of an encoding type, and create them when necessary. It is - /// important to use these properties and functions in generic code, lest you make assumptions that will break down - /// in the future or in the face of more advanced encoding objects. - /// - /// @{ - ///// - ////// /// @brief Retrieves the `decode_state` of the encoding type if it has one, or the `state` type of the /// encoding. @@ -327,6 +317,9 @@ namespace ztd { namespace text { } } + ////// + /// @addtogroup ztd_text_is_state_complete ztd::text::is_state_complete + ////// /// @brief Returns whether or not a state has completed any associated operations and has no more manipulations on /// the output to perform, even if the input source is empty. @@ -365,9 +358,8 @@ namespace ztd { namespace text { } } - ////// - /// @} ///// + /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/transcode_iterator.hpp b/include/ztd/text/transcode_iterator.hpp index 586c7805..7a5e3d30 100644 --- a/include/ztd/text/transcode_iterator.hpp +++ b/include/ztd/text/transcode_iterator.hpp @@ -54,11 +54,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_ranges Ranges, Views, and Iterators - /// - /// @{ - ////// /// @brief A sentinel type that can be used to compare with a ztd::text::transcode_iterator. using transcode_sentinel_t = __txt_detail::__encoding_sentinel_t; @@ -610,8 +605,6 @@ namespace ztd { namespace text { ::std::array _M_cache; }; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/transcode_result.hpp b/include/ztd/text/transcode_result.hpp index c3b71322..53f4adc3 100644 --- a/include/ztd/text/transcode_result.hpp +++ b/include/ztd/text/transcode_result.hpp @@ -55,14 +55,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_result Result Types - /// - /// @brief The result types are used in the transcoding, validation and counting functions. Their sole goal is to - /// make sure. - /// - /// @{ - ////// /// @brief The result of transcoding operations (such as ztd::text::transcode) that specifically do not include /// a reference to the state. @@ -134,7 +126,7 @@ namespace ztd { namespace text { = encoding_error::ok) noexcept(noexcept(stateless_transcode_result(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __error_code, __error_code != encoding_error::ok))) : stateless_transcode_result(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), - __error_code, __error_code != encoding_error::ok) { + __error_code, __error_code != encoding_error::ok) { } ////// @@ -234,8 +226,8 @@ namespace ztd { namespace text { constexpr pivotless_transcode_result(_ArgInput&& __input, _ArgOutput&& __output, _ArgFromState&& __from_state, _ArgToState&& __to_state, encoding_error __error_code = encoding_error::ok) : pivotless_transcode_result(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), - ::std::forward<_ArgFromState>(__from_state), ::std::forward<_ArgToState>(__to_state), __error_code, - __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { + ::std::forward<_ArgFromState>(__from_state), ::std::forward<_ArgToState>(__to_state), __error_code, + __error_code != encoding_error::ok ? static_cast<::std::size_t>(1) : static_cast<::std::size_t>(0)) { } ////// @@ -257,7 +249,7 @@ namespace ztd { namespace text { constexpr pivotless_transcode_result(_ArgInput&& __input, _ArgOutput&& __output, _ArgFromState&& __from_state, _ArgToState&& __to_state, encoding_error __error_code, ::std::size_t __error_count) : __base_t( - ::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __error_code, __error_count) + ::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __error_code, __error_count) , from_state(::std::forward<_ArgFromState>(__from_state)) , to_state(::std::forward<_ArgToState>(__to_state)) { } @@ -297,7 +289,7 @@ namespace ztd { namespace text { __other) noexcept(__txt_detail::__result_type_copy_noexcept<::ztd::text::transcode_result, _Input, _ArgInput, _Output, _ArgOutput, _FromState, _ArgFromState, _ToState, _ArgToState, _Pivot, _ArgPivot>()) : __base_t(__other.input, __other.output, __other.error_code, __other.error_count, __other.from_state, - __other.to_state) + __other.to_state) , pivot(__other.pivot) , pivot_error_code(__other.pivot_error_code) , pivot_error_count(__other.pivot_error_count) { @@ -316,7 +308,7 @@ namespace ztd { namespace text { __other) noexcept(__txt_detail::__result_type_move_noexcept<::ztd::text::transcode_result, _Input, _ArgInput, _Output, _ArgOutput, _FromState, _ArgFromState, _ToState, _ArgToState, _Pivot, _ArgPivot>()) : __base_t(::std::move(__other.input), ::std::move(__other.output), __other.error_code, __other.error_count, - __other.from_state, __other.to_state) + __other.from_state, __other.to_state) , pivot(::std::move(__other.pivot)) , pivot_error_code(::std::move(__other.pivot_error_code)) , pivot_error_count(::std::move(__other.pivot_error_count)) { @@ -349,15 +341,13 @@ namespace ztd { namespace text { _ArgToState&& __to_state, encoding_error __error_code, ::std::size_t __error_count, _ArgPivot&& __pivot, encoding_error __pivot_error_code, ::std::size_t __pivot_error_count) : __base_t(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __from_state, __to_state, - __error_code, __error_count) + __error_code, __error_count) , pivot(::std::forward<_ArgPivot>(__pivot)) , pivot_error_code(::std::move(__pivot_error_code)) , pivot_error_count(::std::move(__pivot_error_count)) { } }; - ////// - /// @} ///// namespace __txt_detail { diff --git a/include/ztd/text/transcode_view.hpp b/include/ztd/text/transcode_view.hpp index f072fb3d..4eb886c7 100644 --- a/include/ztd/text/transcode_view.hpp +++ b/include/ztd/text/transcode_view.hpp @@ -51,11 +51,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_ranges Ranges, Views, and Iterators - /// - /// @{ - ////// /// @brief A transcoding iterator that takes an input of code units and provides an output over the code units of /// the desired `_ToEncoding` after converting from the `_FromEncoding` in a fashion that will never produce a @@ -139,7 +134,7 @@ namespace ztd { namespace text { constexpr transcode_view( range_type __range, from_encoding_type __from_encoding, to_encoding_type __to_encoding) noexcept : transcode_view(::std::move(__range), ::std::move(__from_encoding), ::std::move(__to_encoding), - from_error_handler_type {}, to_error_handler_type {}) { + from_error_handler_type {}, to_error_handler_type {}) { } ////// @@ -154,7 +149,7 @@ namespace ztd { namespace text { to_encoding_type __to_encoding, from_error_handler_type __from_error_handler, to_error_handler_type __to_error_handler) noexcept : _M_it(::std::move(__range), ::std::move(__from_encoding), ::std::move(__to_encoding), - ::std::move(__from_error_handler), ::std::move(__to_error_handler)) { + ::std::move(__from_error_handler), ::std::move(__to_error_handler)) { } ////// @@ -172,8 +167,8 @@ namespace ztd { namespace text { to_error_handler_type __to_error_handler, from_state_type __from_state, to_state_type __to_state) noexcept : _M_it(::std::move(__range), ::std::move(__from_encoding), ::std::move(__to_encoding), - ::std::move(__from_error_handler), ::std::move(__to_error_handler), ::std::move(__from_state), - ::std::move(__to_state)) { + ::std::move(__from_error_handler), ::std::move(__to_error_handler), ::std::move(__from_state), + ::std::move(__to_state)) { } ////// @@ -209,8 +204,6 @@ namespace ztd { namespace text { iterator _M_it; }; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/utf16.hpp b/include/ztd/text/utf16.hpp index f769d5f4..ccd173c1 100644 --- a/include/ztd/text/utf16.hpp +++ b/include/ztd/text/utf16.hpp @@ -535,11 +535,6 @@ namespace ztd { namespace text { }; } // namespace __txt_impl - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - ////// /// @brief A UTF-16 Encoding that traffics in, specifically, the desired code unit type provided as a template /// argument. @@ -567,8 +562,6 @@ namespace ztd { namespace text { /// @brief An instance of the UTF-16 that traffics in wchar_t for ease of use. inline constexpr wide_utf16_t wide_utf16 = {}; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ diff --git a/include/ztd/text/utf32.hpp b/include/ztd/text/utf32.hpp index 1ae10d91..8fb7b9e5 100644 --- a/include/ztd/text/utf32.hpp +++ b/include/ztd/text/utf32.hpp @@ -291,11 +291,6 @@ namespace ztd { namespace text { }; } // namespace __txt_impl - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - ////// /// @brief A UTF-32 Encoding that traffics in, specifically, the desired code unit type provided as a template /// argument. @@ -323,8 +318,6 @@ namespace ztd { namespace text { /// @brief An instance of the UTF-32 that traffics in wchar_t for ease of use. inline constexpr wide_utf32_t wide_utf32 = {}; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/utf8.hpp b/include/ztd/text/utf8.hpp index 58b9e4c6..d264fc3c 100644 --- a/include/ztd/text/utf8.hpp +++ b/include/ztd/text/utf8.hpp @@ -181,9 +181,9 @@ namespace ztd { namespace text { const bool __found_good_utf8_stop = (__use_overlong_null_only ? __ztd_idk_detail_is_lead_mutf8(static_cast(*__it)) : (__overlong_allowed - ? __ztd_idk_detail_is_lead_overlong_utf8( - static_cast(*__it)) - : __ztd_idk_detail_is_lead_utf8(static_cast(*__it)))); + ? __ztd_idk_detail_is_lead_overlong_utf8( + static_cast(*__it)) + : __ztd_idk_detail_is_lead_utf8(static_cast(*__it)))); if (__found_good_utf8_stop) { break; } @@ -607,14 +607,6 @@ namespace ztd { namespace text { }; } // namespace __txt_impl - - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @brief These classes are implementations of the Encoding concept. They serve as the backbone of the library, - /// and the point of extension for users. - /// @{ - ////// /// @brief A UTF-8 Encoding that traffics in, specifically, the desired code unit type provided as a template /// argument. @@ -726,8 +718,6 @@ namespace ztd { namespace text { } // namespace __txt_detail - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text diff --git a/include/ztd/text/validate_result.hpp b/include/ztd/text/validate_result.hpp index 95968566..b1722c60 100644 --- a/include/ztd/text/validate_result.hpp +++ b/include/ztd/text/validate_result.hpp @@ -50,12 +50,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_result Result Types - /// - /// @{ - ///// - ////// /// @brief The result of valdation operations (such as ztd_text_validate_decodable_as and /// ztd_text_validate_encodable_as) that specifically do not include a reference to the state. @@ -173,13 +167,11 @@ namespace ztd { namespace text { constexpr validate_transcode_result(_ArgInput&& __input, bool __is_valid, _ArgFromState&& __from_state, _ArgToState&& __to_state, _ArgPivot&& __pivot) : __base_t(::std::forward<_ArgInput>(__input), __is_valid, ::std::forward<_ArgFromState>(__from_state), - ::std::forward<_ArgToState>(__to_state)) + ::std::forward<_ArgToState>(__to_state)) , pivot(::std::forward<_Pivot>(__pivot)) { } }; - ////// - /// @} ///// namespace __txt_detail { diff --git a/include/ztd/text/wide_execution.hpp b/include/ztd/text/wide_execution.hpp index ea94a47e..0607fdb8 100644 --- a/include/ztd/text/wide_execution.hpp +++ b/include/ztd/text/wide_execution.hpp @@ -45,11 +45,6 @@ namespace ztd { namespace text { ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_ - ////// - /// @addtogroup ztd_text_encodings Encodings - /// - /// @{ - ////// /// @brief The Encoding that represents the "Wide Execution" (wide locale-based) encoding. The wide execution /// encoding is typically associated with the locale, which is tied to the C standard library's setlocale function. @@ -77,8 +72,6 @@ namespace ztd { namespace text { /// @brief An instance of the wide_execution_t type for ease of use. inline constexpr wide_execution_t wide_execution = {}; - ////// - /// @} ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_ }} // namespace ztd::text