diff --git a/doc/api.md b/doc/api.md index 659b0edb..8faebf86 100644 --- a/doc/api.md +++ b/doc/api.md @@ -426,9 +426,7 @@ parameter to avoid the expensive `` include. `FMT_STRING` enables compile-time checks on older compilers. It requires C++14 or later and is a no-op in C++11. -:: {.doxygendefine} -FMT_STRING -:: +::: FMT_STRING To force the use of legacy compile-time checks, define the preprocessor variable `FMT_ENFORCE_COMPILE_STRING`. When set, functions accepting diff --git a/include/fmt/args.h b/include/fmt/args.h index 55ceba49..f6713859 100644 --- a/include/fmt/args.h +++ b/include/fmt/args.h @@ -223,8 +223,8 @@ class dynamic_format_arg_store /** \rst - Reserves space to store at least *new_cap* arguments including - *new_cap_named* named arguments. + Reserves space to store at least `new_cap` arguments including + `new_cap_named` named arguments. \endrst */ void reserve(size_t new_cap, size_t new_cap_named) { diff --git a/include/fmt/base.h b/include/fmt/base.h index eb8193cf..d050fb27 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -888,14 +888,14 @@ template class buffer { /// Clears this buffer. void clear() { size_ = 0; } - // Tries resizing the buffer to contain *count* elements. If T is a POD type + // Tries resizing the buffer to contain `count` elements. If T is a POD type // the new elements may not be initialized. FMT_CONSTEXPR void try_resize(size_t count) { try_reserve(count); size_ = count <= capacity_ ? count : capacity_; } - // Tries increasing the buffer capacity to *new_capacity*. It can increase the + // Tries increasing the buffer capacity to `new_capacity`. It can increase the // capacity by a smaller amount than requested but guarantees there is space // for at least one additional element either by increasing the capacity or by // flushing the buffer if it is full. diff --git a/include/fmt/format.h b/include/fmt/format.h index d0ae0e81..5386aa4b 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -914,11 +914,11 @@ class basic_memory_buffer : public detail::buffer { // Returns a copy of the allocator associated with this buffer. auto get_allocator() const -> Allocator { return alloc_; } - /// Resizes the buffer to contain *count* elements. If T is a POD type new + /// Resizes the buffer to contain `count` elements. If T is a POD type new /// elements may not be initialized. FMT_CONSTEXPR20 void resize(size_t count) { this->try_resize(count); } - /// Increases the buffer capacity to *new_capacity*. + /// Increases the buffer capacity to `new_capacity`. void reserve(size_t new_capacity) { this->try_reserve(new_capacity); } using detail::buffer::append; @@ -1810,7 +1810,7 @@ inline auto find_escape(const char* begin, const char* end) }() /** - * Constructs a compile-time format string from a string literal *s*. + * Constructs a compile-time format string from a string literal `s`. * * **Example**:: * @@ -3871,7 +3871,7 @@ FMT_API auto vsystem_error(int error_code, string_view format_str, /** * Constructs `std::system_error` with a message formatted with * `fmt::format(fmt, args...)`. - * *error_code* is a system error code as given by `errno`. + * `error_code` is a system error code as given by `errno`. * * **Example**:: * @@ -3892,7 +3892,7 @@ auto system_error(int error_code, format_string fmt, T&&... args) /** \rst Formats an error message for an error returned by an operating system or a - language runtime, for example a file opening error, and writes it to *out*. + language runtime, for example a file opening error, and writes it to `out`. The format is the same as the one used by ``std::system_error(ec, message)`` where ``ec`` is ``std::error_code(error_code, std::generic_category()})``. It is implementation-defined but normally looks like: @@ -3902,7 +3902,7 @@ auto system_error(int error_code, format_string fmt, T&&... args) where ** is the passed message and ** is the system message corresponding to the error code. - *error_code* is a system error code as given by ``errno``. + `error_code` is a system error code as given by ``errno``. \endrst */ FMT_API void format_system_error(detail::buffer& out, int error_code, @@ -4173,7 +4173,7 @@ template struct nested_formatter { }; /** - * Converts *value* to ``std::string`` using the default format for type *T*. + * Converts `value` to `std::string` using the default format for type `T`. * * **Example**:: * diff --git a/include/fmt/os.h b/include/fmt/os.h index 35d9aa40..7e1ea345 100644 --- a/include/fmt/os.h +++ b/include/fmt/os.h @@ -146,8 +146,8 @@ FMT_API std::system_error vwindows_error(int error_code, string_view format_str, where ** is the formatted message and ** is the system message corresponding to the error code. - *error_code* is a Windows error code as given by ``GetLastError``. - If *error_code* is not a valid error code such as -1, the system message + `error_code` is a Windows error code as given by ``GetLastError``. + If `error_code` is not a valid error code such as -1, the system message will look like "error -1". **Example**:: @@ -437,7 +437,7 @@ class FMT_API ostream { /** \rst - Opens a file for writing. Supported parameters passed in *params*: + Opens a file for writing. Supported parameters passed in `params`: * ````: Flags passed to `open `_ diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h index 79c69b1d..56f2a95c 100644 --- a/include/fmt/ostream.h +++ b/include/fmt/ostream.h @@ -173,7 +173,7 @@ void vprint(std::basic_ostream& os, /** \rst - Prints formatted data to the stream *os*. + Prints formatted data to the stream `os`. **Example**:: diff --git a/include/fmt/printf.h b/include/fmt/printf.h index fb57d235..c62ea30d 100644 --- a/include/fmt/printf.h +++ b/include/fmt/printf.h @@ -626,7 +626,7 @@ inline auto vfprintf(std::FILE* f, basic_string_view fmt, /** \rst - Prints formatted data to the file *f*. + Prints formatted data to the file `f`. **Example**:: diff --git a/include/fmt/xchar.h b/include/fmt/xchar.h index aa695582..b8bb1359 100644 --- a/include/fmt/xchar.h +++ b/include/fmt/xchar.h @@ -313,9 +313,7 @@ FMT_DEPRECATED void print(const text_style& ts, wformat_string fmt, return print(stdout, ts, fmt, args...); } -/** - Converts *value* to ``std::wstring`` using the default format for type *T*. - */ +/// Converts `value` to `std::wstring` using the default format for type `T`. template inline auto to_wstring(const T& value) -> std::wstring { return format(FMT_STRING(L"{}"), value); }