This commit is contained in:
Victor Zverovich 2018-12-12 17:50:50 -08:00
parent 8c2e15aed5
commit 37f599b1a1
3 changed files with 9 additions and 6 deletions

View File

@ -184,7 +184,7 @@ output ``operator<<`` when one is defined for a user-defined type.
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:

View File

@ -93,7 +93,8 @@ def build_docs(version='dev', **kwargs):
FMT_API= \
"FMT_BEGIN_NAMESPACE=namespace fmt {{" \
"FMT_END_NAMESPACE=}}" \
"FMT_STRING_ALIAS=1"
"FMT_STRING_ALIAS=1" \
"FMT_ENABLE_IF_T(B, T)=T"
EXCLUDE_SYMBOLS = fmt::internal::* StringValue write_str
'''.format(include_dir, doxyxml_dir).encode('UTF-8'))
if p.returncode != 0:

View File

@ -165,6 +165,8 @@ FMT_END_NAMESPACE
# define FMT_USE_TRAILING_RETURN 0
#endif
#define FMT_ENABLE_IF_T(B, T) typename std::enable_if<B, T>::type
#ifndef FMT_USE_GRISU
# define FMT_USE_GRISU 0
//# define FMT_USE_GRISU std::numeric_limits<double>::is_iec559
@ -3495,9 +3497,9 @@ inline typename std::enable_if<internal::is_output_iterator<OutputIt>::value,
\endrst
*/
template <typename OutputIt, typename S, typename... Args>
inline typename std::enable_if<
inline FMT_ENABLE_IF_T(
internal::is_string<S>::value &&
internal::is_output_iterator<OutputIt>::value, OutputIt>::type
internal::is_output_iterator<OutputIt>::value, OutputIt)
format_to(OutputIt out, const S &format_str, const Args &... args) {
internal::check_format_string<Args...>(format_str);
typedef typename format_context_t<OutputIt, FMT_CHAR(S)>::type context;
@ -3551,10 +3553,10 @@ inline typename std::enable_if<
\endrst
*/
template <typename OutputIt, typename S, typename... Args>
inline typename std::enable_if<
inline FMT_ENABLE_IF_T(
internal::is_string<S>::value &&
internal::is_output_iterator<OutputIt>::value,
format_to_n_result<OutputIt>>::type
format_to_n_result<OutputIt>)
format_to_n(OutputIt out, std::size_t n, const S &format_str,
const Args &... args) {
internal::check_format_string<Args...>(format_str);