Wire Sysio Wire Sysion 1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
fc::tuple<> Struct Template Reference

#include <tuple.hpp>

Detailed Description

template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(9, typename A, void)>
struct fc::tuple<>
Provides a fast-compiling tuple that doesn't use fancy meta-programming techniques. It is limited to 4 parameters which is sufficient for most methods argument lists which is the primary use case for this tuple. Methods that require more than 4 parameters are probably better served by defining a struct. The members of the tuple are easily visited with a simple visitor functor of the form: @code struct visitor { template<typename MemberType> void operator()( MemberType& m ); template<typename MemberType> void operator()( const MemberType& m ); }; @endcode

template<typename A=void, typename B=void,typename C=void, typename D=void>> struct tuple { tuple(){} enum size_enum { size = 4 };

template<typename AA, typename BB, typename CC, typename DD> tuple( AA&& aa, BB&& bb, CC&& cc, DD&& dd ) :a( fc::forward<AA>(aa) ), b( fc::forward<BB>(bb) ), c( fc::forward<CC>(cc) ), d( fc::forward<DD>(dd) ) {}

template<typename V> void visit( V&& v ) { v(a); v(b); v(c); v(d); } template<typename V> void visit( V&& v )const { v(a); v(b); v(c); v(d); }

A a; B b; C c; D d; };

Definition at line 55 of file tuple.hpp.


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