Skip to content

Commit

Permalink
[Schema] Only support std::map<std::string, T>
Browse files Browse the repository at this point in the history
  • Loading branch information
arntanguy committed Dec 5, 2023
1 parent ff67a8c commit c573b17
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/mc_rtc/Schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ struct is_std_map : std::false_type
{
};

template<typename... Args>
struct is_std_map<std::map<Args...>> : std::true_type
template<typename T>
struct is_std_map<std::map<std::string, T>> : std::true_type
{
};

Expand Down Expand Up @@ -323,7 +323,7 @@ struct Operations
auto out_ = out.add(name);
T::formToStd(in(description), out_);
}
else if constexpr(details::is_std_vector_schema_v<T> || details::is_std_map_schema_v<T>)
else if constexpr(details::is_std_vector_schema_v<T>)
{
using SchemaT = typename T::value_type;
std::vector<Configuration> in_ = in(description);
Expand All @@ -334,6 +334,7 @@ struct Operations
SchemaT::formToStd(in_[i], out_i);
}
}
else if constexpr(details::is_std_map_schema_v<T>) {}
else { out.add(name, in(description)); }
}
};
Expand Down

0 comments on commit c573b17

Please sign in to comment.