Pretty Good Sum Type  1.0.0
Classes | Typedefs
recursive_union.hpp File Reference

A type modeling a "recursive union". More...

#include <pgs/logical.hpp>
#include <pgs/recursive_wrapper.hpp>
#include <pgs/type_traits.hpp>
#include <stdexcept>
#include <type_traits>
#include <iostream>

Go to the source code of this file.

Classes

struct  pgs::constructor< class >
 A type to model a sum constructor. More...
 
struct  pgs::recursive_union<... >
 recursive union<> primary template More...
 
struct  pgs::overload_tag< T >
 A type to model an overload. More...
 
struct  pgs::recursive_union_dereference< is_recursive_wrapper, T, Ts >
 Dereference the value field in a recursive_union<>. This case handles values that are not recursive_wrapper instances. More...
 
struct  pgs::recursive_union_dereference< true, T, Ts... >
 Dereference the value field in a recursive_union<>. This specialization handles values that are recursive_wrapper instances. More...
 
struct  pgs::recursive_union_indexer< I, T, Ts >
 The purpose of this type is to walk a recursive_union<> and return the value field of the Ith union in the chain. More...
 
struct  pgs::recursive_union_indexer< 0, T, Ts... >
 The purpose of this type is to walk a recursive_union<> and return the value field of the Ith union in the chain. More...
 
struct  pgs::recursive_union_visitor< R, T, Ts >
 Primary template. More...
 
struct  pgs::recursive_union_visitor< void, T, Ts... >
 Partial specialization for void return type. More...
 
class  pgs::invalid_sum_type_access
 Exception type raised on an invalid access into a recursive_union<> More...
 
class  pgs::range<... >
 Compile time sequence of integers. More...
 
struct  pgs::recursive_union_visitor< R, range<>, Ts... >
 Partial specialization. More...
 
struct  pgs::recursive_union_visitor< void, range<>, Ts... >
 Partial specialization. More...
 
struct  pgs::recursive_union_visitor< R, range< I, Is... >, T, Ts... >
 Partial specialization. More...
 
struct  pgs::recursive_union_visitor< R, range< I, Is... >, recursive_wrapper< T >, Ts... >
 Partial specialization. More...
 
struct  pgs::recursive_union_visitor< void, range< I, Is... >, T, Ts... >
 Partial specialization. More...
 
struct  pgs::recursive_union_visitor< void, range< I, Is... >, recursive_wrapper< T >, Ts... >
 Partial specialization. More...
 
struct  pgs::recursive_union<>
 Full specialization. More...
 
struct  pgs::recursive_union< T, Ts... >
 Partial specialization. More...
 

Typedefs

template<std::size_t Z, std::size_t N>
using pgs::range_t = typename detail::mk_range< Z, N >::type
 Alias type for a range.
 

Detailed Description

A type modeling a "recursive union".

The recursive union datatype here is designed to serve as the implementation mechanism of the sum type.