Using std::optional in the fields array; fixes the test and increases safety

This commit is contained in:
Patrick Urbanke
2023-11-11 23:33:15 +01:00
parent 5efa9df16e
commit 2a948e809a
4 changed files with 184 additions and 186 deletions
+2 -2
View File
@@ -85,9 +85,9 @@ struct Reader {
}
template <size_t size, class FunctionType>
std::array<InputVarType, size> to_fields_array(
std::array<std::optional<InputVarType>, size> to_fields_array(
const FunctionType& _fct, const InputObjectType& _obj) const noexcept {
std::array<InputVarType, size> f_arr;
std::array<std::optional<InputVarType>, size> f_arr;
const auto keys = _obj.Keys();
const auto values = _obj.Values();