Fix docs and build issues on gcc-4.6

This commit is contained in:
Victor Zverovich 2018-02-11 09:43:54 -08:00
parent affb35cfb9
commit e9fa42acb8
2 changed files with 13 additions and 16 deletions

View File

@ -20,7 +20,7 @@ They take *format_str* and *args* as arguments.
fields surrounded by braces ``{}``. The fields are replaced with formatted fields surrounded by braces ``{}``. The fields are replaced with formatted
arguments in the resulting string. arguments in the resulting string.
*args* is an argument list representing arbitrary arguments. *args* is an argument list representing objects to be formatted.
The `performance of the format API The `performance of the format API
<https://github.com/fmtlib/fmt/blob/master/README.rst#speed-tests>`_ is close <https://github.com/fmtlib/fmt/blob/master/README.rst#speed-tests>`_ is close
@ -29,18 +29,15 @@ For even better speed use the `write API`_.
.. _format: .. _format:
.. doxygenfunction:: format(CStringRef, ArgList) .. doxygenfunction:: format(string_view, const Args&...)
.. doxygenfunction:: operator""_format(const char *, std::size_t) .. doxygenfunction:: operator""_format(const char *, std::size_t)
.. _print: .. _print:
.. doxygenfunction:: print(CStringRef, ArgList) .. doxygenfunction:: print(string_view, const Args&...)
.. doxygenfunction:: print(std::FILE *, CStringRef, ArgList) .. doxygenfunction:: print(std::FILE *, string_view, const Args&...)
.. doxygenclass:: fmt::BasicFormatter
:members:
Date and time formatting Date and time formatting
------------------------ ------------------------
@ -116,7 +113,7 @@ formatting of user-defined types that have overloaded ``operator<<``::
std::string s = fmt::format("The date is {}", Date(2012, 12, 9)); std::string s = fmt::format("The date is {}", Date(2012, 12, 9));
// s == "The date is 2012-12-9" // s == "The date is 2012-12-9"
.. doxygenfunction:: print(std::ostream&, CStringRef, ArgList) .. doxygenfunction:: print(std::ostream&, string_view, ArgList)
Argument formatters Argument formatters
------------------- -------------------
@ -171,13 +168,13 @@ the POSIX extension for positional arguments. Unlike their standard
counterparts, the ``fmt`` functions are type-safe and throw an exception if an counterparts, the ``fmt`` functions are type-safe and throw an exception if an
argument type doesn't match its format specification. argument type doesn't match its format specification.
.. doxygenfunction:: printf(CStringRef, ArgList) .. doxygenfunction:: printf(string_view, ArgList)
.. doxygenfunction:: fprintf(std::FILE *, CStringRef, ArgList) .. doxygenfunction:: fprintf(std::FILE *, string_view, ArgList)
.. doxygenfunction:: fprintf(std::ostream&, CStringRef, ArgList) .. doxygenfunction:: fprintf(std::ostream&, string_view, ArgList)
.. doxygenfunction:: sprintf(CStringRef, ArgList) .. doxygenfunction:: sprintf(string_view, ArgList)
.. doxygenclass:: fmt::PrintfFormatter .. doxygenclass:: fmt::PrintfFormatter
:members: :members:

View File

@ -720,8 +720,8 @@ class arg_map {
basic_arg<Context> arg; basic_arg<Context> arg;
}; };
entry *map_ = nullptr; entry *map_;
unsigned size_ = 0; unsigned size_;
void push_back(value<Context> val) { void push_back(value<Context> val) {
const internal::named_arg_base<char_type> &named = val.as_named_arg(); const internal::named_arg_base<char_type> &named = val.as_named_arg();
@ -730,7 +730,7 @@ class arg_map {
} }
public: public:
arg_map() {} arg_map() : map_(FMT_NULL), size_(0) {}
void init(const basic_format_args<Context> &args); void init(const basic_format_args<Context> &args);
~arg_map() { delete [] map_; } ~arg_map() { delete [] map_; }
@ -791,7 +791,7 @@ class context_base {
void on_error(const char *message) { parse_context_.on_error(message); } void on_error(const char *message) { parse_context_.on_error(message); }
// Returns an iterator to the beginning of the output range. // Returns an iterator to the beginning of the output range.
auto begin() { return out_; } iterator begin() { return out_; }
// Advances the begin iterator to ``it``. // Advances the begin iterator to ``it``.
void advance_to(iterator it) { out_ = it; } void advance_to(iterator it) { out_ = it; }