forked from OctaForge/libostd
fix octa::MapRange func type checks for regular functors
parent
36d9a35066
commit
93652ed81f
|
@ -445,35 +445,36 @@ namespace detail {
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename R, typename F,
|
template<typename T, typename R, typename F,
|
||||||
bool = octa::IsDefaultConstructible<F>::value &&
|
bool = MapFuncTest<T, F>::value
|
||||||
octa::IsMoveConstructible<F>::value
|
|
||||||
> struct MapFuncTypeObjBase {
|
> struct MapFuncTypeObjBase {
|
||||||
typedef octa::Function<R(octa::RangeReference<T>)> Type;
|
typedef octa::Function<R(octa::RangeReference<T>)> Type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename R, typename F>
|
template<typename T, typename R, typename F>
|
||||||
struct MapFuncTypeObjBase<T, R, F, true> {
|
struct MapFuncTypeObjBase<T, R, F, true> {
|
||||||
typedef F Type;
|
typedef MapLambdaRet<F>(*Type)(MapLambdaArg<F>);
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename R, typename F, bool = MapFuncTest<T, F>::value>
|
template<typename T, typename R, typename F,
|
||||||
struct MapFuncTypeObj {
|
bool = octa::IsDefaultConstructible<F>::value &&
|
||||||
|
octa::IsMoveConstructible<F>::value
|
||||||
|
> struct MapFuncTypeObj {
|
||||||
typedef typename MapFuncTypeObjBase<T, R, F>::Type Type;
|
typedef typename MapFuncTypeObjBase<T, R, F>::Type Type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename R, typename F>
|
template<typename T, typename R, typename F>
|
||||||
struct MapFuncTypeObj<T, R, F, true> {
|
struct MapFuncTypeObj<T, R, F, true> {
|
||||||
typedef MapLambdaRet<F>(*Type)(MapLambdaArg<F>);
|
typedef F Type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename R, typename F, bool = octa::IsClass<F>::value>
|
template<typename T, typename R, typename F, bool = octa::IsClass<F>::value>
|
||||||
struct MapFuncType {
|
struct MapFuncType {
|
||||||
typedef typename MapFuncTypeObj<T, R, F>::Type Type;
|
typedef F Type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename R, typename F>
|
template<typename T, typename R, typename F>
|
||||||
struct MapFuncType<T, R, F, false> {
|
struct MapFuncType<T, R, F, true> {
|
||||||
typedef F Type;
|
typedef typename MapFuncTypeObj<T, R, F>::Type Type;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue