Electroneum
variant_reader< Archive, Variant, TBegin, TEnd > Struct Template Reference

reads a variant More...

#include <variant.h>

Public Types

typedef Archive::variant_tag_type variant_tag_type
 
typedef boost::mpl::next< TBegin >::type TNext
 
typedef boost::mpl::deref< TBegin >::type current_type
 

Static Public Member Functions

static bool read (Archive &ar, Variant &v, variant_tag_type t)
 

Detailed Description

template<class Archive, class Variant, class TBegin, class TEnd>
struct variant_reader< Archive, Variant, TBegin, TEnd >

reads a variant

Definition at line 65 of file variant.h.

Member Typedef Documentation

◆ current_type

template<class Archive , class Variant , class TBegin , class TEnd >
typedef boost::mpl::deref<TBegin>::type variant_reader< Archive, Variant, TBegin, TEnd >::current_type

Definition at line 69 of file variant.h.

◆ TNext

template<class Archive , class Variant , class TBegin , class TEnd >
typedef boost::mpl::next<TBegin>::type variant_reader< Archive, Variant, TBegin, TEnd >::TNext

Definition at line 68 of file variant.h.

◆ variant_tag_type

template<class Archive , class Variant , class TBegin , class TEnd >
typedef Archive::variant_tag_type variant_reader< Archive, Variant, TBegin, TEnd >::variant_tag_type

Definition at line 67 of file variant.h.

Member Function Documentation

◆ read()

template<class Archive , class Variant , class TBegin , class TEnd >
static bool variant_reader< Archive, Variant, TBegin, TEnd >::read ( Archive &  ar,
Variant &  v,
variant_tag_type  t 
)
inlinestatic

Definition at line 72 of file variant.h.

73  {
75  current_type x;
76  if(!::do_serialize(ar, x))
77  {
78  ar.stream().setstate(std::ios::failbit);
79  return false;
80  }
81  v = x;
82  } else {
83  // Tail recursive.... but no mutation is going on. Why?
85  }
86  return true;
87  }
static bool read(Archive &ar, Variant &v, variant_tag_type t)
Definition: variant.h:72
void do_serialize(boost::mpl::false_, Archive &a, epee::net_utils::network_address &na)
boost::mpl::deref< TBegin >::type current_type
Definition: variant.h:69
Here is the call graph for this function:

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