Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Jun 2, 2021
1 parent faf972f commit cbd861f
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The {fmt} library API consists of the following parts:
* :ref:`fmt/os.h <os-api>`: system APIs
* :ref:`fmt/ostream.h <ostream-api>`: ``std::ostream`` support
* :ref:`fmt/printf.h <printf-api>`: ``printf`` formatting
* :ref:`fmt/xchar.h <xchar-api>`: optional ``wchar_t`` support

All functions and types provided by the library reside in namespace ``fmt`` and
macros have prefix ``FMT_``.
Expand Down Expand Up @@ -49,7 +50,7 @@ participate in an overload resolution if the latter is not a string.
.. doxygenfunction:: format(format_string<T...> fmt, T&&... args) -> std::string
.. doxygenfunction:: vformat(string_view fmt, format_args args) -> std::string

.. doxygenfunction:: format_to(OutputIt out, format_string<T...> fmt, T&& args) -> OutputIt
.. doxygenfunction:: format_to(OutputIt out, format_string<T...> fmt, T&&... args) -> OutputIt
.. doxygenfunction:: format_to_n(OutputIt out, size_t n, format_string<T...> fmt, const T&... args) -> format_to_n_result<OutputIt>
.. doxygenfunction:: formatted_size(format_string<T...> fmt, T&&... args) -> size_t

Expand Down Expand Up @@ -123,7 +124,6 @@ times and reduces binary code size compared to a fully parameterized version.
:members:

.. doxygentypedef:: fmt::format_context
.. doxygentypedef:: fmt::wformat_context

Compatibility
-------------
Expand All @@ -132,7 +132,6 @@ Compatibility
:members:

.. doxygentypedef:: fmt::string_view
.. doxygentypedef:: fmt::wstring_view

Locale
------
Expand Down Expand Up @@ -297,15 +296,13 @@ Literal-based API

The following user-defined literals are defined in ``fmt/format.h``.

.. doxygenfunction:: operator""_format(const char *s, size_t n)
.. doxygenfunction:: operator""_format(const char *s, size_t n) -> detail::udl_formatter<char>

.. doxygenfunction:: operator""_a(const char *s, size_t)
.. doxygenfunction:: operator""_a(const char *s, size_t) -> detail::udl_arg<char>

Utilities
---------

.. doxygenstruct:: fmt::is_char

.. doxygentypedef:: fmt::char_t

.. doxygenfunction:: fmt::ptr(const T *p)
Expand All @@ -315,8 +312,6 @@ Utilities

.. doxygenfunction:: fmt::to_string(const T &value)

.. doxygenfunction:: fmt::to_wstring(const T &value)

.. doxygenfunction:: fmt::to_string_view(const Char *s)

.. doxygenfunction:: fmt::join(Range &&range, string_view sep)
Expand Down Expand Up @@ -526,6 +521,20 @@ argument type doesn't match its format specification.

.. doxygenfunction:: sprintf(const S&, const Args&...)

``wchar_t`` Support
===================

The optional header ``fmt/wchar_t.h`` provides support for ``wchar_t`` and
exotic character types.

.. doxygenstruct:: fmt::is_char

.. doxygentypedef:: fmt::wstring_view

.. doxygentypedef:: fmt::wformat_context

.. doxygenfunction:: fmt::to_wstring(const T &value)

Compatibility with C++20 ``std::format``
========================================

Expand Down

0 comments on commit cbd861f

Please sign in to comment.