26#include <olp/core/client/ApiError.h>
27#include <olp/core/porting/make_unique.h>
34template <
typename Type>
37 typename std::remove_cv<typename std::remove_reference<Type>::type>::type;
41template <
typename Type>
42using RemoveRefAndConst =
typename RemoveRefAndConstImpl<Type>::type;
47template <
typename Type>
50 typename std::conditional<std::is_same<Type, std::vector<void>>::value,
55template <
typename Type>
57 using type = std::function<void(Type)>;
63 using type = std::function<void()>;
66template <
typename Type>
68using TypeToFunctionInput =
typename TypeToFunctionInputImpl<Type>::type;
70template <
typename Class,
typename ExecutionContext,
typename Arg>
74template <
typename Class,
typename ExecutionContext,
typename Arg>
89void FuncArgType(std::function<
void()>);
92template <
typename Arg>
93Arg FuncArgType(std::function<
void(Arg)>);
95template <
typename Callable>
99 RemoveRefAndConst<
decltype(SecondArgType(&Callable::operator()))>;
100 using type = RemoveRefAndConst<
decltype(FuncArgType(FirstArgType()))>;
103template <
typename Callable>
105using AsyncResultType =
typename AsyncResultTypeImpl<Callable>::type;
107template <
typename Callable>
110 using ThirdArgTypeParam =
111 RemoveRefAndConst<
decltype(ThirdArgType(&Callable::operator()))>;
112 using type = RemoveRefAndConst<
decltype(FuncArgType(ThirdArgTypeParam()))>;
115template <
typename Callable>
117using DeducedType =
typename DeducedTypeImpl<Callable>::type;
122 virtual void* Get()
const = 0;
127template <
typename SmartPo
inter>
131 : pointer_(std::move(pointer)) {}
134 void*
Get()
const override {
return static_cast<void*
>(pointer_.get()); }
136 SmartPointer pointer_;
140template <
typename SmartPo
inter>
141inline std::unique_ptr<UntypedSmartPointer> MakeUntypedUnique(
142 SmartPointer&& ptr) {
143 return std::make_unique<TypedSmartPointer<SmartPointer>>(std::move(ptr));
Handles the cancellation and final mechanisms.
Definition ExecutionContext.h:31
Rules all the other namespaces.
Definition AppleSignInProperties.h:24
Declares the type of a callable with two parameters.
Definition TypeHelpers.h:97
Declares the type of a callable with three parameters.
Definition TypeHelpers.h:109
Definition TypeHelpers.h:48
A helper class removes type qualifiers and provides a type.
Definition TypeHelpers.h:35
An implementation of UntypedSmartPointer interface.
Definition TypeHelpers.h:128
TypedSmartPointer(SmartPointer &&pointer)
A move contructor.
Definition TypeHelpers.h:130
void * Get() const override
Method converts data to a void pointer.
Definition TypeHelpers.h:134
Definition TypeHelpers.h:121