12 template<
typename A,
typename U>
14 typedef decltype( *((A*)0) + *((
typename std::remove_reference<U>::type*)0) )
type;
16 template<
typename A,
typename U>
18 typedef decltype( *((A*)0) += *((
typename std::remove_reference<U>::type*)0) )
type;
21 template<
typename A,
typename U>
23 typedef decltype( *((A*)0) - *((
typename std::remove_reference<U>::type*)0) )
type;
26 template<
typename A,
typename U>
28 typedef decltype( *((A*)0) -= *((
typename std::remove_reference<U>::type*)0) )
type;
30 template<
typename A,
typename U>
32 typedef decltype( *((A*)0) << *((
typename std::remove_reference<U>::type*)0) )
type;
34 template<
typename A,
typename U>
43 template<
typename T,
unsigned int S,
typename U,
typename A>
46 template<
typename T,
unsigned int S,
typename U,
typename A>
49 template<
typename T,
unsigned int S,
typename U,
typename A>
52 template<
typename T,
unsigned int S,
typename U,
typename A>
55 template<
typename T,
unsigned int S,
typename A>
59 template<u
int64_t RequiredSize, u
int64_t Prov
idedSize>
60 void check_size() { static_assert( (ProvidedSize >= RequiredSize),
"Failed to reserve enough space in fc::fwd<T,S>" ); }
62 template<
typename T,
unsigned int S,
typename A>
65 check_size<sizeof(T),sizeof(_store)>();
66 new (
this) T( std::forward<U>(u) );
69 template<
typename T,
unsigned int S,
typename A>
70 template<
typename U,
typename V>
72 check_size<sizeof(T),sizeof(_store)>();
73 new (
this) T( std::forward<U>(u), std::forward<V>(v) );
75 template<
typename T,
unsigned int S,
typename A>
76 template<
typename U,
typename V,
typename X,
typename Y>
78 check_size<sizeof(T),sizeof(_store)>();
79 new (
this) T( std::forward<U>(u), std::forward<V>(v), std::forward<X>(x), std::forward<Y>(y) );
83 template<
typename T,
unsigned int S,
typename A>
85 check_size<sizeof(T),sizeof(_store)>();
88 template<
typename T,
unsigned int S,
typename A>
90 check_size<sizeof(T),sizeof(_store)>();
93 template<
typename T,
unsigned int S,
typename A>
95 check_size<sizeof(T),sizeof(_store)>();
96 new (
this) T( std::move(*f) );
101 template<
typename T,
unsigned int S,
typename A>
103 template<
typename T,
unsigned int S,
typename A>
106 template<
typename T,
unsigned int S,
typename A>
108 template<
typename T,
unsigned int S,
typename A>
110 template<
typename T,
unsigned int S,
typename A>
113 template<
typename T,
unsigned int S,
typename A>
117 template<
typename T,
unsigned int S,
typename A>
121 template<
typename T,
unsigned int S,
typename A>
124 return **
this = std::forward<U>(u);
127 template<
typename T,
unsigned int S,
typename A>
129 return **
this = std::move(*u);
131 template<
typename T,
unsigned int S,
typename A>