Add support for 'std::variant' in C++17 (#2941)

Add support for 'std::variant' in C++17.

For C++17, if all the alternatives of a variant are formattable
the variant is now also formattable. In addition 'std::monostate'
is now formattable.

Moves implementation into 'std.h', and tests into 'std-test.cc'.

Avoid fold-expression since MSVC was crashing.

Add section for 'fmt/std.h' in API-docs.
This commit is contained in:
jehelset
2022-06-26 07:28:01 -07:00
committed by GitHub
parent 51535866d0
commit 6a775e9560
4 changed files with 162 additions and 3 deletions
+1 -1
View File
@@ -346,7 +346,7 @@ points are:
| | command ``%OS`` produces the locale's alternative representation. |
+---------+--------------------------------------------------------------------+
Specifiers that have a calendaric component such as `'d'` (the day of month)
Specifiers that have a calendaric component such as ``'d'`` (the day of month)
are valid only for ``std::tm`` and not durations or time points.
.. range-specs: