Pretty Good Sum Type  1.0.0
Public Types | Static Public Member Functions | List of all members
pgs::recursive_union_visitor< void, range< I, Is... >, recursive_wrapper< T >, Ts... > Struct Template Reference

Partial specialization. More...

#include <recursive_union.hpp>

Public Types

using type = T
 The type held by the value.
 
using U = recursive_wrapper< type >
 The type of the value.
 
using result_type = void
 The type returned by visit
 

Static Public Member Functions

template<class... Fs>
static result_type visit (recursive_union< U, Ts... > const &u, std::size_t i, Fs &&...fs)
 const overload (recursive_union<U, Ts...> const&)
 
template<class... Fs>
static result_type visit (recursive_union< U, Ts... > &u, std::size_t i, Fs &&...fs)
 non-const overload (recursive_union<U, Ts...>&)
 

Detailed Description

template<std::size_t I, std::size_t... Is, class T, class... Ts>
struct pgs::recursive_union_visitor< void, range< I, Is... >, recursive_wrapper< T >, Ts... >

Partial specialization.

The role of this visitor is to "walk" the recursive union until the active type is reached. When it is, the form of visit that searches for the right closure to apply to the value there is invoked (see recursive union visitor for finding a matching closure)

Template Parameters
IHead of an integer pack
ITail of an integer pack
THead of the parameter pack
TsTail of the parameter pack (of union types)

return type is void, range<> is non-empty. This specialization applies when the head of the parameter pack is a recursive_wrapper<>


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