[keel] Improve correctness
All checks were successful
Build / build (push) Successful in 1m20s

This commit is contained in:
Gary Talent 2025-04-17 01:12:05 -05:00
parent 477834ac04
commit a2e53acb34

View File

@ -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]]