ECSTASY
All in the name
Loading...
Searching...
No Matches
ecstasy::query::Select< SelectedQueryables >::SorteredTie< Valids > Struct Template Reference

Static Public Member Functions

static constexpr SelectedTuple sort (Valids &...valids) noexcept
 Final condition: all queryables are in the good order so tie them and return the tuple.
 
template<Queryable Q, Queryable... Qs>
static constexpr SelectedTuple sort (Valids &...valids, Q &current, Qs &...lefts) noexcept
 Recursively sort the queryables.
 

Detailed Description

template<Queryable... SelectedQueryables>
template<typename... Valids>
struct ecstasy::query::Select< SelectedQueryables >::SorteredTie< Valids >

Definition at line 71 of file Select.hpp.

Member Function Documentation

◆ sort() [1/2]

template<Queryable... SelectedQueryables>
template<typename... Valids>
static constexpr SelectedTuple ecstasy::query::Select< SelectedQueryables >::SorteredTie< Valids >::sort ( Valids &...  valids)
inlinestaticconstexprnoexcept

Final condition: all queryables are in the good order so tie them and return the tuple.

Parameters
[in]validsvalid sorted queryables.
Returns
SelectedTuple selected queryables.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-10-28)

Definition at line 82 of file Select.hpp.

83 {
84 return std::tie(std::forward<Valids &>(valids)...);
85 }
T tie(T... args)

◆ sort() [2/2]

template<Queryable... SelectedQueryables>
template<typename... Valids>
template<Queryable Q, Queryable... Qs>
static constexpr SelectedTuple ecstasy::query::Select< SelectedQueryables >::SorteredTie< Valids >::sort ( Valids &...  valids,
Q &  current,
Qs &...  lefts 
)
inlinestaticconstexprnoexcept

Recursively sort the queryables.

Template Parameters
QCurrent evaluated queryable type.
QsQueryable types to sort after.
Parameters
[in]validsalready sorted queryables.
[in]currentevaluated queryable.
[in]leftsqueryable to sort after current.
Returns
SelectedTuple selected queryables.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-10-28)

Definition at line 103 of file Select.hpp.

104 {
105 if constexpr (std::is_same_v<
106 typename util::meta::Traits<SelectedQueryables...>::template Nth<sizeof...(Valids)>,
107 Q>)
109 std::forward<Valids &>(valids)..., current, std::forward<Qs &>(lefts)...);
110 else
112 std::forward<Valids &>(valids)..., std::forward<Qs &>(lefts)..., current);
113 }
T is_same_v
static constexpr SelectedTuple sort(Valids &...valids) noexcept
Final condition: all queryables are in the good order so tie them and return the tuple.
Definition Select.hpp:82
Empty parameter pack helper type.
Definition Traits.hpp:28

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