Continue translate docs to English

This commit is contained in:
Aleksandr Orefkov 2025-11-17 12:01:31 +03:00
parent f6a0be3e83
commit 2c54daf32b
5 changed files with 2322 additions and 1040 deletions

View File

@ -94,7 +94,7 @@ results_vector get_results_infos() {
ssa fileName = f; ssa fileName = f;
// В начале имени файла может идти число и дефис, для сортировки, уберём их // В начале имени файла может идти число и дефис, для сортировки, уберём их
// At the beginning of the file name there can be a number and a hyphen, for sorting, remove them // At the beginning of the file name there can be a number and a hyphen, for sorting, remove them
if (auto delimeter = fileName.find('-'); delimeter != str::npos && delimeter > 0) { if (auto delimeter = fileName.find('-'); delimeter + 1 > 1) {
if (std::get<1>(fileName(0, delimeter).to_int<unsigned, false, 10, false, false>()) == IntConvertResult::Success) { if (std::get<1>(fileName(0, delimeter).to_int<unsigned, false, 10, false, false>()) == IntConvertResult::Success) {
fileName.remove_prefix(delimeter + 1); fileName.remove_prefix(delimeter + 1);
} }
@ -107,7 +107,6 @@ results_vector get_results_infos() {
void write_header(out_t& out) { void write_header(out_t& out) {
out += get_file_content("header.txt"); out += get_file_content("header.txt");
} }
void write_platforms_cpu(out_t& out, const results_vector& results) { void write_platforms_cpu(out_t& out, const results_vector& results) {
@ -242,7 +241,7 @@ ssa extract_source_for_benchmark(ssa benchName, ssa sourceText) {
std::cerr << "Not found end of " << prevLine; std::cerr << "Not found end of " << prevLine;
throw std::runtime_error{"Not found end of func"}; throw std::runtime_error{"Not found end of func"};
} }
lstringa<2048> text = expr_replaced<u8s>{sourceText.from_to(beginLine, end + indent.length() + 1), indent, "\n"}; lstringa<2048> text{sourceText.from_to(beginLine, end + indent.length() + 1), indent, "\n"};
func_it->second = repl_html_symbols(text(1)); func_it->second = repl_html_symbols(text(1));
} else { } else {
end = sourceText.find("\n}\n", start); end = sourceText.find("\n}\n", start);

View File

@ -119,7 +119,7 @@ ALLOW_UNICODE_NAMES = NO
# Swedish, Turkish, Ukrainian and Vietnamese. # Swedish, Turkish, Ukrainian and Vietnamese.
# The default value is: English. # The default value is: English.
OUTPUT_LANGUAGE = Russian OUTPUT_LANGUAGE = English
# If the BRIEF_MEMBER_DESC tag is set to YES, Doxygen will include brief member # If the BRIEF_MEMBER_DESC tag is set to YES, Doxygen will include brief member
# descriptions after the members that are listed in the file and class # descriptions after the members that are listed in the file and class

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
* ver. 1.2.4 * ver. 1.2.4
* (c) Проект "SimStr", Александр Орефков orefkov@gmail.com * (c) Проект "SimStr", Александр Орефков orefkov@gmail.com
* База для строковых конкатенаций через выражения времени компиляции * База для строковых конкатенаций через выражения времени компиляции
* (c) Project "SimStr", Alexander Orefkov orefkov@gmail.com * (c) Project "SimStr", Aleksandr Orefkov orefkov@gmail.com
* Base for string concatenations via compile-time expressions * Base for string concatenations via compile-time expressions
*/ */
#pragma once #pragma once
@ -174,9 +174,9 @@ public:
/*! /*!
* @ru @brief Базовая концепция строкового объекта. * @ru @brief Базовая концепция строкового объекта.
* @ru @tparam A - проверяемый тип * @tparam A - проверяемый тип
* @ru @tparam K - тип символов * @tparam K - тип символов
* @ru @details В библиотеке для разных целей могут использоваться различные типы объектов строк. * @details В библиотеке для разных целей могут использоваться различные типы объектов строк.
* Мы считаем строковым объектом любой объект, поддерживающий методы: * Мы считаем строковым объектом любой объект, поддерживающий методы:
* - `is_empty()`: возвращает, пуста ли строка. * - `is_empty()`: возвращает, пуста ли строка.
* - `length()`: возвращает длину строки без нулевого терминатора. * - `length()`: возвращает длину строки без нулевого терминатора.
@ -184,9 +184,9 @@ public:
* - `typename symb_type`: задаёт тип символов строки * - `typename symb_type`: задаёт тип символов строки
* *
* @en @brief Base concept of string object. * @en @brief Base concept of string object.
* @en @tparam A - tested type * @tparam A - tested type
* @en @tparam K - type of symbols @ru K - тип символов * @tparam K - type of symbols
* @en @details The library can use different types of string objects for different purposes. * @details The library can use different types of string objects for different purposes.
* We consider a string object to be any object that supports methods: * We consider a string object to be any object that supports methods:
* - `is_empty()`: Returns whether the string is empty. * - `is_empty()`: Returns whether the string is empty.
* - `length()`: returns the length of a string without a null terminator. * - `length()`: returns the length of a string without a null terminator.
@ -201,9 +201,9 @@ concept StrType = requires(const A& a) {
} && std::is_same_v<typename std::remove_cvref_t<A>::symb_type, K>; } && std::is_same_v<typename std::remove_cvref_t<A>::symb_type, K>;
/*! /*!
* @defgroup StrExprs Строковые выражения * @ru @defgroup StrExprs Строковые выражения
* @ru @brief Строковые выражения * @brief Описание строковых выражений
* @ru @details Все типы владеющих строк могут инициализироваться с помощью "строковых выражений" * @details Все типы владеющих строк могут инициализироваться с помощью "строковых выражений"
* (по сути это вариант https://en.wikipedia.org/wiki/Expression_templates для строк). * (по сути это вариант https://en.wikipedia.org/wiki/Expression_templates для строк).
* Строковое выражение - это объект произвольного типа, у которого имеются методы: * Строковое выражение - это объект произвольного типа, у которого имеются методы:
* - `size_t length() const`: выдает длину строки * - `size_t length() const`: выдает длину строки
@ -255,8 +255,9 @@ concept StrType = requires(const A& a) {
* Шаблоны поиска и замены - могут быть любыми строковыми объектами в рантайме. * Шаблоны поиска и замены - могут быть любыми строковыми объектами в рантайме.
* и т.д. и т.п. * и т.д. и т.п.
* *
* @en @brief Строковые выражения * @en @defgroup StrExprs String Expressions
* @en @detailsAll owning string types can be initialized using "string expressions" * @brief Description of String Expressions
* @details All owning string types can be initialized using "string expressions"
* (essentially a variant of https://en.wikipedia.org/wiki/Expression_templates for strings). * (essentially a variant of https://en.wikipedia.org/wiki/Expression_templates for strings).
* A string expression is an object of an arbitrary type that has methods: * A string expression is an object of an arbitrary type that has methods:
* - `size_t length() const`: returns the length of the string * - `size_t length() const`: returns the length of the string
@ -312,9 +313,9 @@ concept StrType = requires(const A& a) {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Концепт "Строковых выражений" * @ru @brief Концепт "Строковых выражений"
* @ru @details Это концепт, проверяющий, является ли тип "строковым выражением". * @details Это концепт, проверяющий, является ли тип "строковым выражением".
* @en @brief Concept of "String Expressions" * @en @brief Concept of "String Expressions"
* @en @details This is a concept that checks whether a type is a "string expression". * @details This is a concept that checks whether a type is a "string expression".
*/ */
template<typename A> template<typename A>
concept StrExpr = requires(const A& a) { concept StrExpr = requires(const A& a) {
@ -326,13 +327,13 @@ concept StrExpr = requires(const A& a) {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Концепт строкового выражения заданного типа символов * @ru @brief Концепт строкового выражения заданного типа символов
* @ru @tparam A - проверяемый тип * @tparam A - проверяемый тип
* @ru @tparam K - проверяемый тип символов * @tparam K - проверяемый тип символов
* @ru @details Служит для задания ограничения к строковому выражению по типу символов * @details Служит для задания ограничения к строковому выражению по типу символов
* @en @brief The concept of a string expression of a given character type * @en @brief The concept of a string expression of a given character type
* @en @tparam A - type being checked * @tparam A - type being checked
* @en @tparam K - character type to be checked * @tparam K - character type to be checked
* @en @details Used to set restrictions on a string expression by character type * @details Used to set restrictions on a string expression by character type
*/ */
template<typename A, typename K> template<typename A, typename K>
concept StrExprForType = StrExpr<A> && std::is_same_v<K, typename A::symb_type>; concept StrExprForType = StrExpr<A> && std::is_same_v<K, typename A::symb_type>;
@ -356,15 +357,15 @@ concept StrExprForType = StrExpr<A> && std::is_same_v<K, typename A::symb_type>;
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Шаблонный класс для конкатенации двух строковых выражений в одно с помощью `operator +` * @ru @brief Шаблонный класс для конкатенации двух строковых выражений в одно с помощью `operator +`
* @ru @tparam A - Тип первого операнда * @tparam A - Тип первого операнда
* @ru @tparam B - Тип второго операнда * @tparam B - Тип второго операнда
* @ru @details Этот объект запоминает ссылки на два операнда операции сложения. * @details Этот объект запоминает ссылки на два операнда операции сложения.
* Когда у него запрашивают необходимый для результата размер буфера - он выдает сумму длин своих операндов. * Когда у него запрашивают необходимый для результата размер буфера - он выдает сумму длин своих операндов.
* Когда запрашивают размещение символов в буфере - размещает сначала первый операнд, затем второй. * Когда запрашивают размещение символов в буфере - размещает сначала первый операнд, затем второй.
* @en @brief Template class for concatenating two string expressions into one using `operator +` * @en @brief Template class for concatenating two string expressions into one using `operator +`
* @en @tparam A - Type of first operand * @tparam A - Type of first operand
* @en @tparam B - Type of second operand * @tparam B - Type of second operand
* @en @detailsThis object remembers references to the two operands of the addition operation. * @details This object remembers references to the two operands of the addition operation.
* When asked for the required buffer size for a result, it gives the sum of the lengths of its operands. * When asked for the required buffer size for a result, it gives the sum of the lengths of its operands.
* When asked to place characters in a buffer, place the first operand first, then the second. * When asked to place characters in a buffer, place the first operand first, then the second.
*/ */
@ -391,20 +392,20 @@ struct strexprjoin {
* @ingroup StrExprs * @ingroup StrExprs
* @anchor op_plus_str_expr * @anchor op_plus_str_expr
* @ru @brief Оператор сложения двух произвольных строковых выражения для одинакового типа символов. * @ru @brief Оператор сложения двух произвольных строковых выражения для одинакового типа символов.
* @ru @param a - первое строковое выражение. * @param a - первое строковое выражение.
* @ru @param b - второе строковое выражение. * @param b - второе строковое выражение.
* @ru @return strexprjoin<A, B>, строковое выражение, генерирующее объединение переданных выражений. * @return strexprjoin<A, B>, строковое выражение, генерирующее объединение переданных выражений.
* @ru @details Когда складываются два объекта - строковых выражения, один типа `A`, другой типа `B`, * @details Когда складываются два объекта - строковых выражения, один типа `A`, другой типа `B`,
* мы возвращаем объект типа strexprjoin<A, B>, который содержит ссылки на два этих операнда. * мы возвращаем объект типа strexprjoin<A, B>, который содержит ссылки на два этих операнда.
* А сам объект strexprjoin<A, B> тоже в свою очередь является строковым выражением, и может участвовать * А сам объект strexprjoin<A, B> тоже в свою очередь является строковым выражением, и может участвовать
* в следующих операциях сложения. Таким образом формируется "дерево" из исходных строковых * в следующих операциях сложения. Таким образом формируется "дерево" из исходных строковых
* выражений, которое потом за один вызов "материализуется" в конечный результат. * выражений, которое потом за один вызов "материализуется" в конечный результат.
* *
* @en @brief An addition operator for two arbitrary string expressions of the same character type. * @en @brief An addition operator for two arbitrary string expressions of the same character type.
* @en @param a - first string expression * @param a - first string expression
* @en @param b - second string expression * @param b - second string expression
* @en @return strexprjoin<A, B>, a string expression that generates a join of the given expressions. * @return strexprjoin<A, B>, a string expression that generates a join of the given expressions.
* @en @details When two objects are added - string expressions, one of type `A`, the other of type `B`, * @details When two objects are added - string expressions, one of type `A`, the other of type `B`,
* we return an object of type strexprjoin<A, B>, which contains references to these two operands. * we return an object of type strexprjoin<A, B>, which contains references to these two operands.
* And the strexprjoin<A, B> object itself, in turn, is also a string expression, and can participate * And the strexprjoin<A, B> object itself, in turn, is also a string expression, and can participate
* in the following addition operations. In this way, a tree is formed from the original strings * in the following addition operations. In this way, a tree is formed from the original strings
@ -418,19 +419,19 @@ inline auto operator+(const A& a, const B& b) {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Конкатенация ссылки на строковое выражение и значения строкового выражения. * @ru @brief Конкатенация ссылки на строковое выражение и значения строкового выражения.
* @ru @tparam A - Тип одного строкового выражения. * @tparam A - Тип одного строкового выражения.
* @ru @tparam B - Тип другого строкового выражения. * @tparam B - Тип другого строкового выражения.
* @ru @tparam last - какое из них первое. * @tparam last - какое из них первое.
* @ru @details Чтобы иметь возможность складывать строковое выражение с операндами, не являющимися строковым выражением, * @details Чтобы иметь возможность складывать строковое выражение с операндами, не являющимися строковым выражением,
* нам нужно иметь возможность вернуть из `operator+` объект, который сохранит ссылку на операнд, являющийся строковым * нам нужно иметь возможность вернуть из `operator+` объект, который сохранит ссылку на операнд, являющийся строковым
* выражением, а для не строкового операнда будет иметь поле со строковым выражением, обрабатывающим второй операнд. * выражением, а для не строкового операнда будет иметь поле со строковым выражением, обрабатывающим второй операнд.
* Можно посмотреть пример в simstr::operator+<StrExpr A, FromIntNumber T>() * Можно посмотреть пример в simstr::operator+<StrExpr A, FromIntNumber T>()
* *
* @en @brief Concatenation of a reference to a string expression and the value of the string expression. * @en @brief Concatenation of a reference to a string expression and the value of the string expression.
* @en @tparam A - Type of a single string expression. * @tparam A - Type of a single string expression.
* @en @tparam B - Type of another string expression. * @tparam B - Type of another string expression.
* @en @tparam last - which one is the first. * @tparam last - which one is the first.
* @en @details To be able to add a string expression with non-string operands, * @details To be able to add a string expression with non-string operands,
* we need to be able to return an object from `operator+` that will retain a reference to the operand, which is a string * we need to be able to return an object from `operator+` that will retain a reference to the operand, which is a string
* expression, and for a non-string operand will have a field with a string expression that processes the second operand. * expression, and for a non-string operand will have a field with a string expression that processes the second operand.
* You can see an example in simstr::operator+<StrExpr A, FromIntNumber T>() * You can see an example in simstr::operator+<StrExpr A, FromIntNumber T>()
@ -469,8 +470,8 @@ struct is_one_of_type<T, void> : std::false_type {};
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief "Пустое" строковое выражение. * @ru @brief "Пустое" строковое выражение.
* @ru @tparam K - тип символа. * @tparam K - тип символа.
* @ru @details Простое строковое выражение, генерирующее пустую строку. * @details Простое строковое выражение, генерирующее пустую строку.
* В основном применяется в функции e_choice, когда одна из веток должна вернуть пустую строку. * В основном применяется в функции e_choice, когда одна из веток должна вернуть пустую строку.
* Либо для начала операции сложения строковых выражений, когда другой операнд не является строковым выражением, * Либо для начала операции сложения строковых выражений, когда другой операнд не является строковым выражением,
* но для него есть оператор сложения со строковыми выражениями. * но для него есть оператор сложения со строковыми выражениями.
@ -481,8 +482,8 @@ struct is_one_of_type<T, void> : std::false_type {};
* - eeuu для пустой строки char32_t * - eeuu для пустой строки char32_t
* *
* @en @brief An "empty" string expression. * @en @brief An "empty" string expression.
* @en @tparam K is a symbol. * @tparam K is a symbol.
* @en @details A simple string expression that generates an empty string. * @details A simple string expression that generates an empty string.
* Mainly used in the e_choice function when one of the branches should return an empty string. * Mainly used in the e_choice function when one of the branches should return an empty string.
* Either to start the addition operation of string expressions when the other operand is not a string expression, * Either to start the addition operation of string expressions when the other operand is not a string expression,
* but there is an addition operator for it with string expressions. * but there is an addition operator for it with string expressions.
@ -555,9 +556,9 @@ struct expr_char {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Оператор сложения строкового выражения и одного символа. * @ru @brief Оператор сложения строкового выражения и одного символа.
* @ru @return строковое выражение, объединяющее переданное выражение и символ. * @return строковое выражение, объединяющее переданное выражение и символ.
* @en @brief Addition operator of a string expression and one character. * @en @brief Addition operator of a string expression and one character.
* @en @return a string expression that combines the passed expression and a character. * @return a string expression that combines the passed expression and a character.
* @details @ru Пример: @en Example: @~ * @details @ru Пример: @en Example: @~
* @~ * @~
* ```cpp * ```cpp
@ -572,12 +573,12 @@ constexpr inline auto operator+(const A& a, K s) {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Генерирует строку из 1 заданного символа. * @ru @brief Генерирует строку из 1 заданного символа.
* @ru @param s - символ. * @param s - символ.
* @ru @return строковое выражение для строки из одного символа. * @return строковое выражение для строки из одного символа.
* *
* @en @brief Generates a string of 1 given character. * @en @brief Generates a string of 1 given character.
* @en @param s - symbol. * @param s - symbol.
* @en @return string expression for a single character string. * @return string expression for a single character string.
*/ */
template<typename K> template<typename K>
constexpr inline auto e_char(K s) { constexpr inline auto e_char(K s) {
@ -601,7 +602,7 @@ struct expr_literal {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Преобразует строковый литерал в строковое выражение. * @ru @brief Преобразует строковый литерал в строковое выражение.
* @ru @details Строковые литералы сами по себе не являются строковыми выражениями. * @details Строковые литералы сами по себе не являются строковыми выражениями.
* Обычно в операциях конкатенации это не вызывает проблем, так как второй операнд уже является строковым выражением, * Обычно в операциях конкатенации это не вызывает проблем, так как второй операнд уже является строковым выражением,
* и для него срабатывает сложение с литералом. Но есть ситуации, когда второй операнд тоже не является * и для него срабатывает сложение с литералом. Но есть ситуации, когда второй операнд тоже не является
* строковым выражением. Например: * строковым выражением. Например:
@ -626,7 +627,7 @@ struct expr_literal {
* Все эти способы работают и выдают одинаковый результат. Каким пользоваться - дело вкуса. * Все эти способы работают и выдают одинаковый результат. Каким пользоваться - дело вкуса.
* *
* @en @brief Converts a string literal to a string expression. * @en @brief Converts a string literal to a string expression.
* @en @details String literals are not themselves string expressions. * @details String literals are not themselves string expressions.
* This usually does not cause problems in concatenation operations, since the second operand is already a string expression, * This usually does not cause problems in concatenation operations, since the second operand is already a string expression,
* and addition with a literal works for it. But there are situations when the second operand is not either * and addition with a literal works for it. But there are situations when the second operand is not either
* string expression. For example: * string expression. For example:
@ -686,9 +687,9 @@ struct expr_literal_join {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Оператор сложения для строкового выражения и строкового литерала такого же типа символов. * @ru @brief Оператор сложения для строкового выражения и строкового литерала такого же типа символов.
* @ru @return Строковое выражение, объединяющее операнды. * @return Строковое выражение, объединяющее операнды.
* @en @brief The addition operator for a string expression and a string literal of the same character type. * @en @brief The addition operator for a string expression and a string literal of the same character type.
* @en @return A string expression concatenating the operands. * @return A string expression concatenating the operands.
*/ */
template<StrExpr A, typename K = typename A::symb_type, typename T, size_t N = const_lit_for<K, T>::Count> template<StrExpr A, typename K = typename A::symb_type, typename T, size_t N = const_lit_for<K, T>::Count>
constexpr inline auto operator+(const A& a, T&& s) { constexpr inline auto operator+(const A& a, T&& s) {
@ -698,9 +699,9 @@ constexpr inline auto operator+(const A& a, T&& s) {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Оператор сложения для строкового литерала такого же типа символов и строкового выражения. * @ru @brief Оператор сложения для строкового литерала такого же типа символов и строкового выражения.
* @ru @return Строковое выражение, объединяющее операнды. * @return Строковое выражение, объединяющее операнды.
* @en @brief The addition operator for a string literal of the same character type and string expression. * @en @brief The addition operator for a string literal of the same character type and string expression.
* @en @return A string expression concatenating the operands. * @return A string expression concatenating the operands.
*/ */
template<StrExpr A, typename K = typename A::symb_type, typename T, size_t N = const_lit_for<K, T>::Count> template<StrExpr A, typename K = typename A::symb_type, typename T, size_t N = const_lit_for<K, T>::Count>
constexpr inline auto operator+(T&& s, const A& a) { constexpr inline auto operator+(T&& s, const A& a) {
@ -710,15 +711,15 @@ constexpr inline auto operator+(T&& s, const A& a) {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Тип строкового выражения, возвращающего N заданных символов. * @ru @brief Тип строкового выражения, возвращающего N заданных символов.
* @ru @details Количество символов и сам символ константы, т.е. задаются при компиляции. * @details Количество символов и сам символ константы, т.е. задаются при компиляции.
* @ru @tparam K - тип символа. * @tparam K - тип символа.
* @ru @tparam N - количество символов. * @tparam N - количество символов.
* @ru @tparam S - символ, по умолчанию пробел. * @tparam S - символ, по умолчанию пробел.
* @en @brief A type of string expression that returns N specified characters. * @en @brief A type of string expression that returns N specified characters.
* @en @details The number of characters and the constant symbol itself, i.e. are specified during compilation. * @details The number of characters and the constant symbol itself, i.e. are specified during compilation.
* @en @tparam K is a symbol. * @tparam K is a symbol.
* @en @tparam N - number of characters. * @tparam N - number of characters.
* @en @tparam S - character, space by default. * @tparam S - character, space by default.
*/ */
template<typename K, size_t N, size_t S = ' '> template<typename K, size_t N, size_t S = ' '>
struct expr_spaces { struct expr_spaces {
@ -736,11 +737,11 @@ struct expr_spaces {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Генерирует строку из N char пробелов. * @ru @brief Генерирует строку из N char пробелов.
* @ru @tparam N - Количество пробелов. * @tparam N - Количество пробелов.
* @ru @return строковое выражение для N char пробелов. * @return строковое выражение для N char пробелов.
* @en @brief Generates a string of N char spaces. * @en @brief Generates a string of N char spaces.
* @en @tparam N - Number of spaces. * @tparam N - Number of spaces.
* @en @return string expression for N char spaces. * @return string expression for N char spaces.
* @details @ru Пример: @en Example: @~ * @details @ru Пример: @en Example: @~
* ```cpp * ```cpp
* stringa text = e_spca<10>() + text + e_spca<10>(); * stringa text = e_spca<10>() + text + e_spca<10>();
@ -754,12 +755,12 @@ constexpr inline auto e_spca() {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Генерирует строку из N wchar_t пробелов. * @ru @brief Генерирует строку из N wchar_t пробелов.
* @ru @tparam N - Количество пробелов. * @tparam N - Количество пробелов.
* @ru @return строковое выражение для N wchar_t пробелов. * @return строковое выражение для N wchar_t пробелов.
* @en @brief Generates a string of N wchar_t spaces. * @en @brief Generates a string of N wchar_t spaces.
* @en @tparam N - Number of spaces. * @tparam N - Number of spaces.
* @en @return string expression for N wchar_t spaces. * @return string expression for N wchar_t spaces.
* @details @ru Пример: @en Example: @~ * @~ @details @ru Пример: @en Example: @~
* ```cpp * ```cpp
* stringw text = e_spcw<10>() + text + e_spcw<10>(); * stringw text = e_spcw<10>() + text + e_spcw<10>();
* ``` * ```
@ -772,12 +773,12 @@ constexpr inline auto e_spcw() {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Тип строкового выражения, возвращающего N заданных символов. * @ru @brief Тип строкового выражения, возвращающего N заданных символов.
* @ru @tparam K - тип символа. * @tparam K - тип символа.
* @ru @details Количество символов и сам символ переменные, т.е. могут меняться в рантайм. * @details Количество символов и сам символ переменные, т.е. могут меняться в рантайм.
* Напрямую обычно не используется, создается через e_c(). * Напрямую обычно не используется, создается через e_c().
* @en @brief A type of string expression that returns N specified characters. * @en @brief A type of string expression that returns N specified characters.
* @en @tparam K is a symbol. * @tparam K is a symbol.
* @en @details The number of characters and the character itself are variable, i.e. can change at runtime. * @details The number of characters and the character itself are variable, i.e. can change at runtime.
* Usually not used directly, created via e_c(). * Usually not used directly, created via e_c().
*/ */
template<typename K> template<typename K>
@ -798,15 +799,15 @@ struct expr_pad {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Генерирует строку из l символов s типа K. * @ru @brief Генерирует строку из l символов s типа K.
* @ru @tparam K - тип символа. * @tparam K - тип символа.
* @ru @param l - количество символов. * @param l - количество символов.
* @ru @param s - символ. * @param s - символ.
* @ru @return строковое выражение, генерирующее строку из l символов k. * @return строковое выражение, генерирующее строку из l символов k.
* @en @brief Generates a string of l characters s of type K. * @en @brief Generates a string of l characters s of type K.
* @en @tparam K is a symbol. * @tparam K is a symbol.
* @en @param l - number of characters. * @param l - number of characters.
* @en @param s - symbol. * @param s - symbol.
* @en @return a string expression that generates a string of l characters k. * @return a string expression that generates a string of l characters k.
*/ */
template<typename K> template<typename K>
constexpr inline auto e_c(size_t l, K s) { constexpr inline auto e_c(size_t l, K s) {
@ -816,14 +817,14 @@ constexpr inline auto e_c(size_t l, K s) {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Строковое выражение условного выбора. * @ru @brief Строковое выражение условного выбора.
* @ru @tparam A Тип ветки для true. * @tparam A Тип ветки для true.
* @ru @tparam B Тип ветки для false. * @tparam B Тип ветки для false.
* @ru @details Выражение, в зависимости от истинности условия генерирующее либо выражение A, либо выражение B. * @details Выражение, в зависимости от истинности условия генерирующее либо выражение A, либо выражение B.
* Напрямую тип обычно не используется, создаётся через e_choice(). * Напрямую тип обычно не используется, создаётся через e_choice().
* @en @brief Conditional selection string expression. * @en @brief Conditional selection string expression.
* @en @tparam A Branch type for true. * @tparam A Branch type for true.
* @en @tparam B Branch type for false. * @tparam B Branch type for false.
* @en @details An expression that, depending on the truth of the condition, generates either expression A or expression B. * @details An expression that, depending on the truth of the condition, generates either expression A or expression B.
* The type is usually not used directly; it is created via e_choice(). * The type is usually not used directly; it is created via e_choice().
*/ */
template<StrExpr A, StrExprForType<typename A::symb_type> B> template<StrExpr A, StrExprForType<typename A::symb_type> B>
@ -845,12 +846,12 @@ struct expr_choice {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Строковое выражение условного выбора. * @ru @brief Строковое выражение условного выбора.
* @ru @tparam A Тип ветки для true. * @tparam A Тип ветки для true.
* @ru @details Выражение, в зависимости от истинности условия генерирующее либо выражение A, либо пустую строку. * @details Выражение, в зависимости от истинности условия генерирующее либо выражение A, либо пустую строку.
* Напрямую тип обычно не используется, создаётся через e_if(). * Напрямую тип обычно не используется, создаётся через e_if().
* @en @brief Conditional selection string expression. * @en @brief Conditional selection string expression.
* @en @tparam A Branch type for true. * @tparam A Branch type for true.
* @en @details An expression that, depending on the truth of the condition, generates either expression A or an empty string. * @details An expression that, depending on the truth of the condition, generates either expression A or an empty string.
* Title type usually not used, create through e_if(). * Title type usually not used, create through e_if().
*/ */
template<StrExpr A> template<StrExpr A>
@ -871,8 +872,8 @@ struct expr_if {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Строковое выражение условного выбора. * @ru @brief Строковое выражение условного выбора.
* @ru @tparam A Тип ветки для true. * @tparam A Тип ветки для true.
* @ru @details Выражение, в зависимости от истинности условия генерирующее либо выражение A, либо строку из строкового литерала. * @details Выражение, в зависимости от истинности условия генерирующее либо выражение A, либо строку из строкового литерала.
* Напрямую тип обычно не используется, создаётся через e_choice(). * Напрямую тип обычно не используется, создаётся через e_choice().
* *
* Так как строковые литералы не являются строковыми выражениями, то использовать их в виде одиночного выражения в частях * Так как строковые литералы не являются строковыми выражениями, то использовать их в виде одиночного выражения в частях
@ -893,8 +894,8 @@ struct expr_if {
* e_if(!condition, "empty"); * e_if(!condition, "empty");
* ``` * ```
* @en @brief Conditional selection string expression. * @en @brief Conditional selection string expression.
* @en @tparam A Branch type for true. * @tparam A Branch type for true.
* @en @details An expression that, depending on the truth of the condition, generates either expression A or a string from a string literal. * @details An expression that, depending on the truth of the condition, generates either expression A or a string from a string literal.
* The type is usually not used directly; it is created via e_choice(). * The type is usually not used directly; it is created via e_choice().
* *
* Since string literals are not string expressions, use them as a single expression in parts * Since string literals are not string expressions, use them as a single expression in parts
@ -938,7 +939,7 @@ struct expr_choice_one_lit {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Строковое выражение условного выбора. * @ru @brief Строковое выражение условного выбора.
* @ru @details Выражение, в зависимости от истинности условия генерирующее либо один строковый литерал, либо другой. * @details Выражение, в зависимости от истинности условия генерирующее либо один строковый литерал, либо другой.
* Напрямую тип обычно не используется, создаётся через e_choice(). * Напрямую тип обычно не используется, создаётся через e_choice().
* *
* Так как строковые литералы не являются строковыми выражениями, то использовать их в виде одиночного выражения в частях * Так как строковые литералы не являются строковыми выражениями, то использовать их в виде одиночного выражения в частях
@ -959,7 +960,7 @@ struct expr_choice_one_lit {
* e_if(!condition, "empty"); * e_if(!condition, "empty");
* ``` * ```
* @en @brief Conditional selection string expression. * @en @brief Conditional selection string expression.
* @en @details An expression that, depending on the truth of the condition, generates either one string literal or another. * @details An expression that, depending on the truth of the condition, generates either one string literal or another.
* The type is usually not used directly; it is created via e_choice(). * The type is usually not used directly; it is created via e_choice().
* *
* Since string literals are not string expressions, use them as a single expression in parts * Since string literals are not string expressions, use them as a single expression in parts
@ -1006,19 +1007,19 @@ struct expr_choice_two_lit {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Создание условного строкового выражения expr_choice. * @ru @brief Создание условного строкового выражения expr_choice.
* @ru @tparam A - Тип выражение при истинности условия, выводится из аргумента. * @tparam A - Тип выражение при истинности условия, выводится из аргумента.
* @ru @tparam B - Тип выражения при ложности условия, выводится из аргумента. * @tparam B - Тип выражения при ложности условия, выводится из аргумента.
* @ru @param c - булево условие. * @param c - булево условие.
* @ru @param a - строковое выражение, выполняющееся при `c == true`. * @param a - строковое выражение, выполняющееся при `c == true`.
* @ru @param b - строковое выражение, выполняющееся при `c == false`. * @param b - строковое выражение, выполняющееся при `c == false`.
* @ru @details Служит для возможности в одном выражении выбирать разные варианты в зависимости от условия. * @details Служит для возможности в одном выражении выбирать разные варианты в зависимости от условия.
* @en @brief Create a conditional string expression expr_choice. * @en @brief Create a conditional string expression expr_choice.
* @en @tparam A - Type expression when the condition is true, inferred from the argument. * @tparam A - Type expression when the condition is true, inferred from the argument.
* @en @tparam B - The type of expression when the condition is false, inferred from the argument. * @tparam B - The type of expression when the condition is false, inferred from the argument.
* @en @param c is a Boolean condition. * @param c is a Boolean condition.
* @en @param a is a string expression that is executed when `c == true`. * @param a is a string expression that is executed when `c == true`.
* @en @param b is a string expression that is executed when `c == false`. * @param b is a string expression that is executed when `c == false`.
* @en @details Serves to allow you to select different options in one expression depending on the condition. * @details Serves to allow you to select different options in one expression depending on the condition.
* *
* @ru Примеры: @en Example: @~ * @ru Примеры: @en Example: @~
* ```cpp * ```cpp
@ -1069,16 +1070,15 @@ inline constexpr auto e_choice(bool c, T&& str_a, L&& str_b) {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Создание условного строкового выражения expr_if * @ru @brief Создание условного строкового выражения expr_if
* @ru @tparam A - Тип выражение при истинности условия, выводится из аргумента * @tparam A - Тип выражение при истинности условия, выводится из аргумента
* @ru @param c - булево условие * @param c - булево условие
* @ru @param a - строковое выражение, выполняющееся при `c == true` * @param a - строковое выражение, выполняющееся при `c == true`
* @ru @details Служит для возможности в одном выражении генерировать в зависимости от условия либо указанный вариант, либо пустую строку. * @details Служит для возможности в одном выражении генерировать в зависимости от условия либо указанный вариант, либо пустую строку.
* @en @brief Creating a conditional string expression expr_if * @en @brief Creating a conditional string expression expr_if
* @en @ingroup StrExprs * @tparam A - Type expression when the condition is true, inferred from the argument
* @en @tparam A - Type expression when the condition is true, inferred from the argument * @param c - boolean condition
* @en @param c - boolean condition * @param a - string expression executed when `c == true`
* @en @param a - string expression executed when `c == true` * @details Serves to allow one expression to generate, depending on the condition, either the specified option or an empty string.
* @en @details Serves to allow one expression to generate, depending on the condition, either the specified option or an empty string.
* *
* @ru Примеры: @en Example @~ * @ru Примеры: @en Example @~
* ```cpp * ```cpp
@ -1127,11 +1127,11 @@ inline constexpr auto e_if(bool c, T&& str) {
/*! /*!
* @ingroup StrExprs * @ingroup StrExprs
* @ru @brief Тип для использования std::string и std::string_view как источников в строковых выражениях. * @ru @brief Тип для использования std::string и std::string_view как источников в строковых выражениях.
* @ru @tparam K - тип символа. * @tparam K - тип символа.
* @ru @tparam T - тип источника. * @tparam T - тип источника.
* @en @brief A type for using std::string and std::string_view as sources in string expressions. * @en @brief A type for using std::string and std::string_view as sources in string expressions.
* @en @tparam K is a symbol. * @tparam K is a symbol.
* @en @tparam T - source type. * @tparam T - source type.
*/ */
template<typename K, typename T> template<typename K, typename T>
struct expr_stdstr { struct expr_stdstr {

View File

@ -93,4 +93,4 @@ Windows и Linux (в WSL), с использованием компилятор
Также simstr используется в моём проекте [v8sqlite](https://github.com/orefkov/v8sqlite) Также simstr используется в моём проекте [v8sqlite](https://github.com/orefkov/v8sqlite)
## Сгенерированная документация ## Сгенерированная документация
[Находится здесь](https://snegopat.ru/simstr/docs/) [Находится здесь](https://snegopat.ru/simstr/docs_ru/)