Pretty Good Sum Type  1.0.0
Public Types | Static Public Member Functions | List of all members
pgs::recursive_union_visitor< R, T, Ts > Struct Template Reference

Primary template. More...

#include <recursive_union.hpp>

Public Types

using result_type = R
 The return type of visit
 

Static Public Member Functions

template<class O , class F , class... Fs, class = pgs::enable_if_t<is_callable<F, T>::value, void>>
static result_type visit (overload_tag< O >, T const &t, F &&f, Fs &&...)
 f is callable on t (of type T const&)
 
template<class F , class O , class... Fs, class = pgs::enable_if_t<!is_callable<F, T>::value, void>>
static result_type visit (overload_tag< O > o, T const &t, F &&, Fs &&...fs)
 f is not callable on t (of type T const&), recurse
 
template<class O , class F , class... Fs, class = pgs::enable_if_t<is_callable<F, T>::value, void>>
static result_type visit (overload_tag< O >, T &t, F &&f, Fs &&...)
 f is callable on t (of type T&)
 
template<class F , class O , class... Fs, class = pgs::enable_if_t<!is_callable<F, T>::value, void>>
static result_type visit (overload_tag< O > o, T &t, F &&, Fs &&...fs)
 f is not callable on t (of type T&)
 

Detailed Description

template<class R, class T, class... Ts>
struct pgs::recursive_union_visitor< R, T, Ts >

Primary template.

Template Parameters
Rreturn type
Thead of the parameter pack
Tstail of the paramter pack

If the f (of type F) under consideration can be applied to t (that is, applied to a T) do so, else continue searching by stripping f off the head of the parameter pack and recurively invoking visit.


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