Prevent warnings about unused lambda captures

This commit is contained in:
Martchus 2019-11-03 22:37:19 +01:00
parent 1024b8e391
commit e29db0fa87
2 changed files with 7 additions and 0 deletions

View File

@ -270,6 +270,8 @@ template <typename Type, Traits::EnableIf<IsVariant<Type>> *> void BinarySeriali
[this](const auto &valueOfActualType) {
if constexpr (!std::is_same_v<std::decay_t<decltype(valueOfActualType)>, std::monostate>) {
write(valueOfActualType);
} else {
CPP_UTILITIES_UNUSED(this)
}
},
variant);

View File

@ -9,6 +9,8 @@
#include "../traits.h"
#include <c++utilities/application/global.h>
#include <rapidjson/document.h>
#include <rapidjson/rapidjson.h>
#include <rapidjson/stringbuffer.h>
@ -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::decay_t<decltype(reflectableOfActualType)>, std::monostate>) {
push(reflectableOfActualType, data, allocator);
} else {
CPP_UTILITIES_UNUSED(data)
CPP_UTILITIES_UNUSED(allocator)
}
},
reflectable);