This commit is contained in:
parent
97b707b61c
commit
477834ac04
@ -132,19 +132,19 @@ template<auto Func>
|
|||||||
class ConverterFunc: public BaseConverter {
|
class ConverterFunc: public BaseConverter {
|
||||||
private:
|
private:
|
||||||
template<typename SrcType, typename DstType>
|
template<typename SrcType, typename DstType>
|
||||||
struct ParamExtractor {
|
struct ParamPack {
|
||||||
using Src = SrcType;
|
using Src = SrcType;
|
||||||
using Dst = DstType;
|
using Dst = DstType;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename S, typename D>
|
template<typename S, typename D>
|
||||||
static auto makeParamExtractor(ox::Error (*)(keel::Context&, S&, D&)) {
|
static ParamPack<S, D> extractParams(ox::Error (*)(Context&, S&, D&)) {
|
||||||
return ParamExtractor<S, D>{};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using SrcType = typename decltype(makeParamExtractor(Func))::Src;
|
using SrcType = typename decltype(extractParams(Func))::Src;
|
||||||
using DstType = typename decltype(makeParamExtractor(Func))::Dst;
|
using DstType = typename decltype(extractParams(Func))::Dst;
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
constexpr ox::StringView srcTypeName() const noexcept final {
|
constexpr ox::StringView srcTypeName() const noexcept final {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user