diff --git a/lib/binary/reflector.h b/lib/binary/reflector.h index 50026e9..8022fc8 100644 --- a/lib/binary/reflector.h +++ b/lib/binary/reflector.h @@ -270,6 +270,8 @@ template > *> void BinarySeriali [this](const auto &valueOfActualType) { if constexpr (!std::is_same_v, std::monostate>) { write(valueOfActualType); + } else { + CPP_UTILITIES_UNUSED(this) } }, variant); diff --git a/lib/json/reflector.h b/lib/json/reflector.h index e1f1a9b..75979eb 100644 --- a/lib/json/reflector.h +++ b/lib/json/reflector.h @@ -9,6 +9,8 @@ #include "../traits.h" +#include + #include #include #include @@ -289,6 +291,9 @@ void push(const Type &reflectable, RAPIDJSON_NAMESPACE::Value &value, RAPIDJSON_ [&data, &allocator](const auto &reflectableOfActualType) { if constexpr (!std::is_same_v, std::monostate>) { push(reflectableOfActualType, data, allocator); + } else { + CPP_UTILITIES_UNUSED(data) + CPP_UTILITIES_UNUSED(allocator) } }, reflectable);