Skip to content

Commit

Permalink
🛠️📝 Completely fix up documentation on newer doxygen generators under…
Browse files Browse the repository at this point in the history
… newer rules

- ⏱️ Fix up benchmark compilation errors and test proper macros
- 👷‍♀️ Set up new CMake variables and dependencies for ICU & friends
  • Loading branch information
ThePhD committed Aug 13, 2024
1 parent ad27c3e commit f2cba30
Show file tree
Hide file tree
Showing 74 changed files with 202 additions and 582 deletions.
25 changes: 9 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
15 changes: 15 additions & 0 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
17 changes: 17 additions & 0 deletions benchmarks/barrier/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
)
Expand Down
7 changes: 4 additions & 3 deletions benchmarks/conversion_speed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ function (generate_converion_speed_benchmark_targets name data_name title)
ztd::text
ctre::ctre
utf8cpp
$<$<BOOL:${ZTD_TEXT_BOOST.TEXT}>:Boost::text>
$<$<BOOL:${ZTD_TEXT_BENCHMARKS_BOOST.TEXT}>:Boost::text>
$<$<BOOL:${ZTD_TEXT_BENCHMARKS_ICU}>:icu>
benchmark::benchmark
${CMAKE_DL_LIBS}
)
Expand Down Expand Up @@ -94,8 +95,8 @@ function (generate_converion_speed_benchmark_targets name data_name title)
ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_CUNEICODE_SINGLE_FROM_BULK_BENCHMARKS=$<IF:$<BOOL:${ZTD_TEXT_BENCHMARKS_INTERNALS}>,1,0>
ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_CUNEICODE_BASIC_UNCHECKED_BENCHMARKS=$<IF:$<BOOL:${ZTD_TEXT_BENCHMARKS_INTERNALS}>,1,0>
ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_CUNEICODE_SINGLE_FROM_BULK_UNCHECKED_BENCHMARKS=$<IF:$<BOOL:${ZTD_TEXT_BENCHMARKS_INTERNALS}>,1,0>
ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICU_BENCHMARKS=$<IF:$<BOOL:${ZTD_TEXT_ICU}>,1,0>
ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICONV_BENCHMARKS=$<IF:$<BOOL:${ZTD_TEXT_LIBICONV}>,1,0>
ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICU_BENCHMARKS=$<IF:$<BOOL:${ZTD_TEXT_BENCHMARKS_ICU}>,1,0>
ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_LIBICONV_BENCHMARKS=$<IF:$<BOOL:${ZTD_TEXT_BENCHMARKS_LIBICONV}>,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
Expand Down
6 changes: 1 addition & 5 deletions benchmarks/conversion_speed/source/iconv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@

#include <ztd/text/benchmarks/version.hpp>

#if ZTD_IS_ON(ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICONV_BENCHMARKS)
#if ZTD_IS_ON(ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_LIBICONV_BENCHMARKS)

#include <ztd/platform.hpp>

#if ZTD_IS_ON(ZTD_PLATFORM_LIBICONV)

#include <benchmark/benchmark.h>

#include <barrier/barrier.h>
Expand Down Expand Up @@ -167,5 +165,3 @@ BENCHMARK(utf32_to_utf8_well_formed_iconv);
BENCHMARK(utf32_to_utf16_well_formed_iconv);

#endif

#endif
6 changes: 1 addition & 5 deletions benchmarks/conversion_speed/source/iconv.init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@

#include <ztd/text/benchmarks/version.hpp>

#if ZTD_IS_ON(ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_ICONV_BENCHMARKS)
#if ZTD_IS_ON(ZTD_TEXT_BENCHMARKS_CONVERSION_SPEED_LIBICONV_BENCHMARKS)

#include <ztd/platform.hpp>

#if ZTD_IS_ON(ZTD_PLATFORM_LIBICONV)

#include <benchmark/benchmark.h>

#include <barrier/barrier.h>
Expand Down Expand Up @@ -168,5 +166,3 @@ BENCHMARK(utf32_to_utf8_init_well_formed_iconv);
BENCHMARK(utf32_to_utf16_init_well_formed_iconv);

#endif

#endif
4 changes: 0 additions & 4 deletions benchmarks/conversion_speed/source/icu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@

#include <ztd/platform.hpp>

#if ZTD_IS_ON(ZTD_PLATFORM_ICU)

#include <benchmark/benchmark.h>

#include <barrier/barrier.h>
Expand Down Expand Up @@ -399,5 +397,3 @@ BENCHMARK(utf32_to_utf16_well_formed_icu_u_strFromUTF32);
BENCHMARK(utf32_to_utf16_well_formed_icu_ucnv_toUChars);

#endif

#endif
4 changes: 0 additions & 4 deletions benchmarks/conversion_speed/source/icu.init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@

#include <ztd/platform.hpp>

#if ZTD_IS_ON(ZTD_PLATFORM_ICU)

#include <benchmark/benchmark.h>

#include <barrier/barrier.h>
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion benchmarks/error_handling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions benchmarks/include/ztd/text/benchmarks/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions documentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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}
Expand Down
11 changes: 8 additions & 3 deletions documentation/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions documentation/source/api/encodings/encoding_scheme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ Aliases
Base Template
-------------

.. doxygenclass:: ztd::text::encoding_scheme
:members:
.. doxygengroup:: ztd_text_encoding_scheme
:content-only:
3 changes: 2 additions & 1 deletion documentation/source/api/is_state_complete.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@
is_state_complete
=================

.. doxygenfunction:: ztd::text::is_state_complete
.. doxygengroup:: ztd_text_is_state_complete
:content-only:
10 changes: 5 additions & 5 deletions documentation/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
# Breathe Configuration
#
breathe_projects = {}
breathe_default_project = "ztd.text"
breathe_default_project = "ztd_text"

# autosectionlabel Configuration
#
Expand All @@ -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(
Expand All @@ -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):
Expand Down
5 changes: 3 additions & 2 deletions documentation/source/design/lucky 7 extensions/injective.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 </api/is_decode_injective>` and :doc:`ztd::text::is_encode_injective </api/is_encode_injective>` for more information.
11 changes: 2 additions & 9 deletions include/ztd/text/any_encoding.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -98,7 +93,7 @@ namespace ztd { namespace text {
&& !is_specialization_of_v<remove_cvref_t<_EncodingArg>, ::std::in_place_type_t>>* = nullptr>
any_byte_encoding(_EncodingArg&& __encoding, _Args&&... __args)
: any_byte_encoding(::std::in_place_type<remove_cvref_t<_EncodingArg>>,
::std::forward<_EncodingArg>(__encoding), ::std::forward<_Args>(__args)...) {
::std::forward<_EncodingArg>(__encoding), ::std::forward<_Args>(__args)...) {
}

//////
Expand All @@ -114,7 +109,7 @@ namespace ztd { namespace text {
::std::enable_if_t<!::std::is_same_v<_Byte, code_unit_t<remove_cvref_t<_EncodingArg>>>>* = nullptr>
any_byte_encoding(::std::in_place_type_t<_EncodingArg>, _Args&&... __args)
: __base_t(::std::in_place_type_t<encoding_scheme<remove_cvref_t<_EncodingArg>, endian::native, _Byte>> {},
::std::forward<_Args>(__args)...) {
::std::forward<_Args>(__args)...) {
}

//////
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit f2cba30

Please sign in to comment.