Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

format_sequence
PrevUpHomeNext

The return type of sequence.

Synopsis

Defined in header <boost/mysql/sequence.hpp>

template<
    class Range,
    class FormatFn>
struct format_sequence;
Data Members

Name

Description

format_function

The format function to apply to each element in the range.

glue

The string to output between range elements.

range

The range to format.

Description

Contains a range, a formatter function, and a glue string. This type satisfies the Formattable concept.

When formatted, format_function is invoked for each element in range. The string glue is output raw (as per format_context_base::append_raw) between consecutive invocations of the formatter function, generating an effect similar to std::ranges::views::join.

Don't instantiate this struct directly - use sequence, instead.

Type requirements
  • Expressions std::begin(range) and std::end(range) should return an input iterator/sentinel pair that can be compared for (in)equality.
  • The expression static_cast<const FormatFn&>(fn)(* std::begin(range), ctx) should be well formed, with ctx begin a format_context_base&.

Convenience header <boost/mysql.hpp>


PrevUpHomeNext