MySQL 9.6.0
Source Code Documentation
mysql::ranges::detail::Projection_transform< index_tp > Struct Template Reference

Function-like class that projects a tuple-like object to the Nth element. More...

#include <projection_views.h>

Static Public Member Functions

template<class Tuple_t >
static decltype(auto) transform (Tuple_t &&tuple)
 Select component number index_tp from tuple. More...
 

Detailed Description

template<std::size_t index_tp>
struct mysql::ranges::detail::Projection_transform< index_tp >

Function-like class that projects a tuple-like object to the Nth element.

Template Parameters
index_tpThe index of the element to project on.

Member Function Documentation

◆ transform()

template<std::size_t index_tp>
template<class Tuple_t >
static decltype(auto) mysql::ranges::detail::Projection_transform< index_tp >::transform ( Tuple_t &&  tuple)
inlinestatic

Select component number index_tp from tuple.

The element type must not be an rvalue reference.

The returned type is:

  • a reference, if either the tuple is an lvalue reference, or the element type is an lvalue reference.
  • a non-reference, otherwise, i.e., when the element type is a non-reference and the tuple type is an rvalue reference. In this case, the returned value is move-constructed from the tuple element.

The documentation for this struct was generated from the following file: