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

sequence_range_t
PrevUpHomeNext

The type of range produced by sequence.

Synopsis

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

template<
    class T>
using sequence_range_t = see-below;
Description

This type trait can be used to obtain the range type produced by calling sequence. This type is used as the Range template parameter in format_sequence.

By default, sequence copies its input range, unless using std::ref. C arrays are copied into std::array objects. This type trait accounts these transformations.

Formally, given the input range type T (which can be a reference with cv-qualifiers):

  • If T is a C array or a reference to one (as per std::is_array), and the array elements' type is U, yields std::array<std::remove_cv_t<U>, N>.
  • If T is a std::reference_wrapper<U> object, or a reference to one, yields U&.
  • Otherwise, yields std::remove_cvref_t<T>.

Examples:

  • sequence_range_t<const std::vector<int>&> is std::vector<int>.
  • sequence_range_t<std::reference_wrapper<std::vector<int>>> is std::vector<int>&.
  • sequence_range_t<std::reference_wrapper<const std::vector<int>>> is const std::vector<int>&.
  • sequence_range_t<int(&)[4]> is std::array<int, 4>.

Convenience header <boost/mysql.hpp>


PrevUpHomeNext