EasyDelegate  2.0
Delegate and deferred callers for C++11.
types.hpp
Go to the documentation of this file.
1 
13 #ifndef EASYDELEGATE_NO_DEFERRED_CALLING
14  #include <tuple> // std::tuple<...>
15  #include <type_traits> // std::remove_reference<type>
16 #endif
17 
18 #ifndef _INCLUDE_EASYDELEGATE_TYPES_HPP_
19 #define _INCLUDE_EASYDELEGATE_TYPES_HPP_
20 
21 namespace EasyDelegate
22 {
23  #ifndef EASYDELEGATE_NO_DEFERRED_CALLING
24 
30  template<int ...> struct seq {};
31 
38  template<int N, int ...S> struct gens : gens<N-1, N-1, S...> {};
39 
46  template<int ...S> struct gens<0, S...>
47  {
49  typedef seq<S...> type;
50  };
51  #endif
52 
53  #ifndef EASYDELEGATE_NO_DEFERRED_CALLING
54 
59  template <typename... typenames>
60  using NoReferenceTuple = std::tuple<typename std::remove_reference<typenames>::type...>;
61  #endif // EASYDELEGATE_NO_DEFERRED_CALLING
62 
64  template <typename returnType, typename... parameters>
65  using StaticMethodPointer = returnType(*)(parameters...);
66 
68  template <typename className, typename returnType, typename... parameters>
69  using MemberMethodPointer = returnType(className::*)(parameters...);
70 } // End NameSpace EasyDelegate
71 #endif // _INCLUDE_EASYDELEGATE_TYPES_HPP_
returnType(className::*)(parameters...) MemberMethodPointer
Helper typedef to a pointer of a class member method with the given signature.
Definition: types.hpp:69
returnType(*)(parameters...) StaticMethodPointer
Helper typedef to a pointer of a static method with the given signature.
Definition: types.hpp:65
Namespace containing all EasyDelegate functionality.
Definition: deferredcallers.hpp:20
std::tuple< typename std::remove_reference< typenames >::type...> NoReferenceTuple
A helper typedef for an std::tuple that removes the reference from referenced types.
Definition: types.hpp:60