fmtlib.net -> fmt.dev

This commit is contained in:
Victor Zverovich 2019-05-17 15:42:00 -07:00
parent 5e7bdf1b97
commit 91bb3aaf06
6 changed files with 40 additions and 40 deletions

View File

@ -467,7 +467,7 @@
* Implemented ``constexpr`` parsing of format strings and `compile-time format * Implemented ``constexpr`` parsing of format strings and `compile-time format
string checks string checks
<http://fmtlib.net/dev/api.html#compile-time-format-string-checks>`_. For <https://fmt.dev/dev/api.html#compile-time-format-string-checks>`_. For
example example
.. code:: c++ .. code:: c++
@ -528,7 +528,7 @@
throw format_error("invalid specifier"); throw format_error("invalid specifier");
* Added `iterator support * Added `iterator support
<http://fmtlib.net/dev/api.html#output-iterator-support>`_: <https://fmt.dev/dev/api.html#output-iterator-support>`_:
.. code:: c++ .. code:: c++
@ -539,7 +539,7 @@
fmt::format_to(std::back_inserter(out), "{}", 42); fmt::format_to(std::back_inserter(out), "{}", 42);
* Added the `format_to_n * Added the `format_to_n
<http://fmtlib.net/dev/api.html#_CPPv2N3fmt11format_to_nE8OutputItNSt6size_tE11string_viewDpRK4Args>`_ <https://fmt.dev/dev/api.html#_CPPv2N3fmt11format_to_nE8OutputItNSt6size_tE11string_viewDpRK4Args>`_
function that restricts the output to the specified number of characters function that restricts the output to the specified number of characters
(`#298 <https://github.com/fmtlib/fmt/issues/298>`_): (`#298 <https://github.com/fmtlib/fmt/issues/298>`_):
@ -550,7 +550,7 @@
// out == "1234" (without terminating '\0') // out == "1234" (without terminating '\0')
* Added the `formatted_size * Added the `formatted_size
<http://fmtlib.net/dev/api.html#_CPPv2N3fmt14formatted_sizeE11string_viewDpRK4Args>`_ <https://fmt.dev/dev/api.html#_CPPv2N3fmt14formatted_sizeE11string_viewDpRK4Args>`_
function for computing the output size: function for computing the output size:
.. code:: c++ .. code:: c++
@ -560,7 +560,7 @@
auto size = fmt::formatted_size("{}", 12345); // size == 5 auto size = fmt::formatted_size("{}", 12345); // size == 5
* Improved compile times by reducing dependencies on standard headers and * Improved compile times by reducing dependencies on standard headers and
providing a lightweight `core API <http://fmtlib.net/dev/api.html#core-api>`_: providing a lightweight `core API <https://fmt.dev/dev/api.html#core-api>`_:
.. code:: c++ .. code:: c++
@ -572,7 +572,7 @@
<https://github.com/fmtlib/fmt#compile-time-and-code-bloat>`_. <https://github.com/fmtlib/fmt#compile-time-and-code-bloat>`_.
* Added the `make_format_args * Added the `make_format_args
<http://fmtlib.net/dev/api.html#_CPPv2N3fmt16make_format_argsEDpRK4Args>`_ <https://fmt.dev/dev/api.html#_CPPv2N3fmt16make_format_argsEDpRK4Args>`_
function for capturing formatting arguments: function for capturing formatting arguments:
.. code:: c++ .. code:: c++
@ -654,7 +654,7 @@
fmt::format("{} {two}", 1, fmt::arg("two", 2)); fmt::format("{} {two}", 1, fmt::arg("two", 2));
* Removed the write API in favor of the `format API * Removed the write API in favor of the `format API
<http://fmtlib.net/dev/api.html#format-api>`_ with compile-time handling of <https://fmt.dev/dev/api.html#format-api>`_ with compile-time handling of
format strings. format strings.
* Disallowed formatting of multibyte strings into a wide character target * Disallowed formatting of multibyte strings into a wide character target
@ -1115,10 +1115,10 @@
Including ``format.h`` from the ``cppformat`` directory is deprecated Including ``format.h`` from the ``cppformat`` directory is deprecated
but works via a proxy header which will be removed in the next major version. but works via a proxy header which will be removed in the next major version.
The documentation is now available at http://fmtlib.net. The documentation is now available at https://fmt.dev.
* Added support for `strftime <http://en.cppreference.com/w/cpp/chrono/c/strftime>`_-like * Added support for `strftime <http://en.cppreference.com/w/cpp/chrono/c/strftime>`_-like
`date and time formatting <http://fmtlib.net/3.0.0/api.html#date-and-time-formatting>`_ `date and time formatting <https://fmt.dev/3.0.0/api.html#date-and-time-formatting>`_
(`#283 <https://github.com/fmtlib/fmt/issues/283>`_): (`#283 <https://github.com/fmtlib/fmt/issues/283>`_):
.. code:: c++ .. code:: c++
@ -1150,7 +1150,7 @@
// s == "The date is 2012-12-9" // s == "The date is 2012-12-9"
* Added support for `custom argument formatters * Added support for `custom argument formatters
<http://fmtlib.net/3.0.0/api.html#argument-formatters>`_ <https://fmt.dev/3.0.0/api.html#argument-formatters>`_
(`#235 <https://github.com/fmtlib/fmt/issues/235>`_). (`#235 <https://github.com/fmtlib/fmt/issues/235>`_).
* Added support for locale-specific integer formatting with the ``n`` specifier * Added support for locale-specific integer formatting with the ``n`` specifier
@ -1530,7 +1530,7 @@ Documentation
* Added `Building the documentation * Added `Building the documentation
<http://fmtlib.net/2.0.0/usage.html#building-the-documentation>`_ <https://fmt.dev/2.0.0/usage.html#building-the-documentation>`_
section to the documentation. section to the documentation.
* Documentation build script is now compatible with Python 3 and newer pip versions. * Documentation build script is now compatible with Python 3 and newer pip versions.

View File

@ -14,23 +14,23 @@
**{fmt}** is an open-source formatting library for C++. **{fmt}** is an open-source formatting library for C++.
It can be used as a safe and fast alternative to (s)printf and iostreams. It can be used as a safe and fast alternative to (s)printf and iostreams.
`Documentation <http://fmtlib.net/latest/>`__ `Documentation <https://fmt.dev/latest/>`__
Q&A: ask questions on `StackOverflow with the tag fmt <http://stackoverflow.com/questions/tagged/fmt>`_. Q&A: ask questions on `StackOverflow with the tag fmt <http://stackoverflow.com/questions/tagged/fmt>`_.
Features Features
-------- --------
* Replacement-based `format API <http://fmtlib.net/dev/api.html>`_ with * Replacement-based `format API <https://fmt.dev/dev/api.html>`_ with
positional arguments for localization. positional arguments for localization.
* `Format string syntax <http://fmtlib.net/dev/syntax.html>`_ similar to the one * `Format string syntax <https://fmt.dev/dev/syntax.html>`_ similar to the one
of `str.format <https://docs.python.org/2/library/stdtypes.html#str.format>`_ of `str.format <https://docs.python.org/2/library/stdtypes.html#str.format>`_
in Python. in Python.
* Safe `printf implementation * Safe `printf implementation
<http://fmtlib.net/latest/api.html#printf-formatting>`_ including <https://fmt.dev/latest/api.html#printf-formatting>`_ including
the POSIX extension for positional arguments. the POSIX extension for positional arguments.
* Implementation of the ISO C++ standards proposal `P0645 * Implementation of the ISO C++ standards proposal `P0645
Text Formatting <http://fmtlib.net/Text%20Formatting.html>`__. Text Formatting <https://fmt.dev/Text%20Formatting.html>`__.
* Support for user-defined types. * Support for user-defined types.
* High performance: faster than common standard library implementations of * High performance: faster than common standard library implementations of
`printf <http://en.cppreference.com/w/cpp/io/c/fprintf>`_ and `printf <http://en.cppreference.com/w/cpp/io/c/fprintf>`_ and
@ -47,14 +47,14 @@ Features
* Ease of use: small self-contained code base, no external dependencies, * Ease of use: small self-contained code base, no external dependencies,
permissive BSD `license permissive BSD `license
<https://github.com/fmtlib/fmt/blob/master/LICENSE.rst>`_ <https://github.com/fmtlib/fmt/blob/master/LICENSE.rst>`_
* `Portability <http://fmtlib.net/latest/index.html#portability>`_ with * `Portability <https://fmt.dev/latest/index.html#portability>`_ with
consistent output across platforms and support for older compilers. consistent output across platforms and support for older compilers.
* Clean warning-free codebase even on high warning levels * Clean warning-free codebase even on high warning levels
(``-Wall -Wextra -pedantic``). (``-Wall -Wextra -pedantic``).
* Support for wide strings. * Support for wide strings.
* Optional header-only configuration enabled with the ``FMT_HEADER_ONLY`` macro. * Optional header-only configuration enabled with the ``FMT_HEADER_ONLY`` macro.
See the `documentation <http://fmtlib.net/latest/>`_ for more details. See the `documentation <https://fmt.dev/latest/>`_ for more details.
Examples Examples
-------- --------
@ -107,7 +107,7 @@ Use {fmt} as a safe portable replacement for ``itoa``
// access the string with to_string(buf) or buf.data() // access the string with to_string(buf) or buf.data()
Format objects of user-defined types via a simple `extension API Format objects of user-defined types via a simple `extension API
<http://fmtlib.net/latest/api.html#formatting-user-defined-types>`_: <https://fmt.dev/latest/api.html#formatting-user-defined-types>`_:
.. code:: c++ .. code:: c++
@ -132,8 +132,8 @@ Format objects of user-defined types via a simple `extension API
// s == "The date is 2012-12-9" // s == "The date is 2012-12-9"
Create your own functions similar to `format Create your own functions similar to `format
<http://fmtlib.net/latest/api.html#format>`_ and <https://fmt.dev/latest/api.html#format>`_ and
`print <http://fmtlib.net/latest/api.html#print>`_ `print <https://fmt.dev/latest/api.html#print>`_
which take arbitrary arguments (`godbolt <https://godbolt.org/g/MHjHVf>`_): which take arbitrary arguments (`godbolt <https://godbolt.org/g/MHjHVf>`_):
.. code:: c++ .. code:: c++
@ -185,7 +185,7 @@ formatting (`dtoa-benchmark <https://github.com/fmtlib/dtoa-benchmark>`_)
and as fast as `double-conversion <https://github.com/google/double-conversion>`_: and as fast as `double-conversion <https://github.com/google/double-conversion>`_:
.. image:: https://user-images.githubusercontent.com/576385/54883977-9fe8c000-4e28-11e9-8bde-272d122e7c52.jpg .. image:: https://user-images.githubusercontent.com/576385/54883977-9fe8c000-4e28-11e9-8bde-272d122e7c52.jpg
:target: http://fmtlib.net/unknown_mac64_clang10.0.html :target: https://fmt.dev/unknown_mac64_clang10.0.html
Compile time and code bloat Compile time and code bloat
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -244,7 +244,7 @@ Running the tests
Please refer to `Building the library`__ for the instructions on how to build Please refer to `Building the library`__ for the instructions on how to build
the library and run the unit tests. the library and run the unit tests.
__ http://fmtlib.net/latest/usage.html#building-the-library __ https://fmt.dev/latest/usage.html#building-the-library
Benchmarks reside in a separate repository, Benchmarks reside in a separate repository,
`format-benchmarks <https://github.com/fmtlib/format-benchmark>`_, `format-benchmarks <https://github.com/fmtlib/format-benchmark>`_,
@ -474,7 +474,7 @@ License
<https://github.com/fmtlib/fmt/blob/master/LICENSE.rst>`_. <https://github.com/fmtlib/fmt/blob/master/LICENSE.rst>`_.
The `Format String Syntax The `Format String Syntax
<http://fmtlib.net/latest/syntax.html>`_ <https://fmt.dev/latest/syntax.html>`_
section in the documentation is based on the one from Python `string module section in the documentation is based on the one from Python `string module
documentation <https://docs.python.org/3/library/string.html#module-string>`_ documentation <https://docs.python.org/3/library/string.html#module-string>`_
adapted for the current library. For this reason the documentation is adapted for the current library. For this reason the documentation is

View File

@ -58,7 +58,7 @@
<span class="caret"></span></a> <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
{% for v in versions.split(',') %} {% for v in versions.split(',') %}
<li><a href="http://fmtlib.net/{{v}}">{{v}}</a></li> <li><a href="https://fmt.dev/{{v}}">{{v}}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
</li> </li>

View File

@ -1,2 +1,2 @@
If you are not redirected automatically, follow the If you are not redirected automatically, follow the
`link to the fmt documentation <http://fmtlib.net/latest/>`_. `link to the fmt documentation <https://fmt.dev/latest/>`_.

View File

@ -2,15 +2,15 @@
{% block extrahead %} {% block extrahead %}
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="refresh" content="1;url=http://fmtlib.net/latest/"> <meta http-equiv="refresh" content="1;url=https://fmt.dev/latest/">
<script type="text/javascript"> <script type="text/javascript">
window.location.href = "http://fmtlib.net/latest/" window.location.href = "https://fmt.dev/latest/"
</script> </script>
<title>Page Redirection</title> <title>Page Redirection</title>
{% endblock %} {% endblock %}
{% block document %} {% block document %}
If you are not redirected automatically, follow the <a href='http://fmtlib.net/latest/'>link to the fmt documentation</a>. If you are not redirected automatically, follow the <a href='https://fmt.dev/latest/'>link to the fmt documentation</a>.
{% endblock %} {% endblock %}
{% block footer %} {% block footer %}

View File

@ -25,7 +25,7 @@ template <class O>
using iter_difference_t = ptrdiff_t; using iter_difference_t = ptrdiff_t;
} }
// http://fmtlib.net/Text%20Formatting.html#format.syn // https://fmt.dev/Text%20Formatting.html#format.syn
namespace std { namespace std {
// [format.error], class format_error // [format.error], class format_error
class format_error; class format_error;
@ -105,7 +105,7 @@ namespace std {
size_t formatted_size(wstring_view fmt, const Args&... args); size_t formatted_size(wstring_view fmt, const Args&... args);
} }
// http://fmtlib.net/Text%20Formatting.html#format.error // https://fmt.dev/Text%20Formatting.html#format.error
namespace std { namespace std {
class format_error : public runtime_error { class format_error : public runtime_error {
public: public:
@ -125,7 +125,7 @@ struct error_handler {
} }
} }
// http://fmtlib.net/Text%20Formatting.html#format.parse_context // https://fmt.dev/Text%20Formatting.html#format.parse_context
namespace std { namespace std {
template<class charT> template<class charT>
class basic_format_parse_context { class basic_format_parse_context {
@ -199,7 +199,7 @@ constexpr void basic_format_parse_context<charT>::check_arg_id(size_t id) {
} }
} }
// http://fmtlib.net/Text%20Formatting.html#format.context // https://fmt.dev/Text%20Formatting.html#format.context
namespace std { namespace std {
template<class Out, class charT> template<class Out, class charT>
class basic_format_context { class basic_format_context {
@ -261,7 +261,7 @@ template <typename T, typename Char> struct formatter;
} }
} }
// http://fmtlib.net/Text%20Formatting.html#format.arg // https://fmt.dev/Text%20Formatting.html#format.arg
namespace std { namespace std {
template<class Context> template<class Context>
class basic_format_arg { class basic_format_arg {
@ -422,14 +422,14 @@ void basic_format_arg<Context>::handle::format(basic_format_parse_context<char_t
format_(parse_ctx, format_ctx, ptr_); format_(parse_ctx, format_ctx, ptr_);
} }
// http://fmtlib.net/Text%20Formatting.html#format.visit // https://fmt.dev/Text%20Formatting.html#format.visit
template<class Visitor, class Context> template<class Visitor, class Context>
auto visit_format_arg(Visitor&& vis, basic_format_arg<Context> arg) { auto visit_format_arg(Visitor&& vis, basic_format_arg<Context> arg) {
return visit(vis, get_value(arg)); return visit(vis, get_value(arg));
} }
} }
// http://fmtlib.net/Text%20Formatting.html#format.store // https://fmt.dev/Text%20Formatting.html#format.store
namespace std { namespace std {
template<class Context, class... Args> template<class Context, class... Args>
struct format_arg_store { // exposition only struct format_arg_store { // exposition only
@ -437,7 +437,7 @@ namespace std {
}; };
} }
// http://fmtlib.net/Text%20Formatting.html#format.basic_args // https://fmt.dev/Text%20Formatting.html#format.basic_args
namespace std { namespace std {
template<class Context> template<class Context>
class basic_format_args { class basic_format_args {
@ -471,13 +471,13 @@ basic_format_arg<Context> basic_format_args<Context>::get(size_t i) const noexce
} }
namespace std { namespace std {
// http://fmtlib.net/Text%20Formatting.html#format.make_args // https://fmt.dev/Text%20Formatting.html#format.make_args
template<class Context /*= format_context*/, class... Args> template<class Context /*= format_context*/, class... Args>
format_arg_store<Context, Args...> make_format_args(const Args&... args) { format_arg_store<Context, Args...> make_format_args(const Args&... args) {
return {basic_format_arg<Context>(args)...}; return {basic_format_arg<Context>(args)...};
} }
// http://fmtlib.net/Text%20Formatting.html#format.make_wargs // https://fmt.dev/Text%20Formatting.html#format.make_wargs
template<class... Args> template<class... Args>
format_arg_store<wformat_context, Args...> make_wformat_args(const Args&... args) { format_arg_store<wformat_context, Args...> make_wformat_args(const Args&... args) {
return make_format_args<wformat_context>(args...); return make_format_args<wformat_context>(args...);
@ -708,7 +708,7 @@ struct formatter {
}; };
} // namespace detail } // namespace detail
// http://fmtlib.net/Text%20Formatting.html#format.functions // https://fmt.dev/Text%20Formatting.html#format.functions
template<class... Args> template<class... Args>
string format(string_view fmt, const Args&... args) { string format(string_view fmt, const Args&... args) {
return vformat(fmt, make_format_args(args...)); return vformat(fmt, make_format_args(args...));