This commit is contained in:
parent
477834ac04
commit
a2e53acb34
@ -129,7 +129,7 @@ class BaseConverter {
|
||||
|
||||
|
||||
template<auto Func>
|
||||
class ConverterFunc: public BaseConverter {
|
||||
class ConverterFunc final: public BaseConverter {
|
||||
private:
|
||||
template<typename SrcType, typename DstType>
|
||||
struct ParamPack {
|
||||
@ -200,14 +200,14 @@ class Converter {
|
||||
BaseConverter *m_conv{};
|
||||
public:
|
||||
template<auto Func>
|
||||
static Converter make() {
|
||||
static Converter make() noexcept {
|
||||
Converter out;
|
||||
static_assert(sizeof(ConverterFunc<Func>) <= sizeof(out.m_buff));
|
||||
out.m_conv = new (out.m_buff.data()) ConverterFunc<Func>{};
|
||||
return out;
|
||||
}
|
||||
constexpr Converter() {}
|
||||
Converter(Converter const &other):
|
||||
Converter(Converter const &other) noexcept:
|
||||
m_buff{other.m_buff},
|
||||
m_conv{m_buff.data()} {}
|
||||
[[nodiscard]]
|
||||
|
Loading…
x
Reference in New Issue
Block a user