Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fuzz
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldreik committed Jun 8, 2019
2 parents 6056911 + 4faadff commit ee91514
Show file tree
Hide file tree
Showing 12 changed files with 647 additions and 521 deletions.
10 changes: 5 additions & 5 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ participate in an overload resolution if the latter is not a string.
.. _format:

.. doxygenfunction:: format(const S&, const Args&...)
.. doxygenfunction:: vformat(const S&, basic_format_args<typename buffer_context<Char>::type>)
.. doxygenfunction:: vformat(const S&, basic_format_args<buffer_context<Char>>)

.. _print:

Expand Down Expand Up @@ -183,7 +183,7 @@ You can also write a formatter for a hierarchy of classes::
Output Iterator Support
-----------------------

.. doxygenfunction:: fmt::format_to(OutputIt, const S &, const Args &...)
.. doxygenfunction:: fmt::format_to(OutputIt, const S&, const Args&...)
.. doxygenfunction:: fmt::format_to_n(OutputIt, std::size_t, string_view, const Args&...)
.. doxygenstruct:: fmt::format_to_n_result
:members:
Expand All @@ -200,7 +200,7 @@ The following user-defined literals are defined in ``fmt/format.h``.
Utilities
---------

.. doxygenclass:: fmt::is_char
.. doxygenstruct:: fmt::is_char

.. doxygentypedef:: fmt::char_t

Expand Down Expand Up @@ -357,7 +357,7 @@ user-defined types that have overloaded ``operator<<``::
std::string s = fmt::format("The date is {}", date(2012, 12, 9));
// s == "The date is 2012-12-9"

.. doxygenfunction:: print(std::basic_ostream<fmt::char_t<S>>&, const S&, const Args&...)
.. doxygenfunction:: print(std::basic_ostream<Char>&, const S&, const Args&...)

.. _printf-api:

Expand All @@ -375,6 +375,6 @@ argument type doesn't match its format specification.

.. doxygenfunction:: fprintf(std::FILE *, const S&, const Args&...)

.. doxygenfunction:: fprintf(std::basic_ostream<fmt::char_t<S>>&, const S&, const Args&...)
.. doxygenfunction:: fprintf(std::basic_ostream<Char>&, const S&, const Args&...)

.. doxygenfunction:: sprintf(const S&, const Args&...)
7 changes: 3 additions & 4 deletions include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ template <typename T> struct make_unsigned_or_unchanged<T, true> {
};

template <typename Rep, typename Period,
typename std::enable_if<std::is_integral<Rep>::value, int>::type = 0>
FMT_ENABLE_IF(std::is_integral<Rep>::value)>
inline std::chrono::duration<Rep, std::milli> get_milliseconds(
std::chrono::duration<Rep, Period> d) {
// this may overflow and/or the result may not fit in the
Expand Down Expand Up @@ -466,9 +466,8 @@ inline std::chrono::duration<Rep, std::milli> get_milliseconds(
#endif
}

template <
typename Rep, typename Period,
typename std::enable_if<std::is_floating_point<Rep>::value, int>::type = 0>
template <typename Rep, typename Period,
FMT_ENABLE_IF(std::is_floating_point<Rep>::value)>
inline std::chrono::duration<Rep, std::milli> get_milliseconds(
std::chrono::duration<Rep, Period> d) {
return std::chrono::duration<Rep, std::milli>(
Expand Down
Loading

0 comments on commit ee91514

Please sign in to comment.