Skip to content

Commit

Permalink
Adding enum list support (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhavg authored and dskyle committed Oct 20, 2018
1 parent bbd912b commit bf21273
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/madara/knowledge/CapnAdapt.h
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ inline auto capn_get(typename C::Reader& reader, const CapnList<R, B, C>& info,
template<typename T, typename R, typename B, typename C, typename A>
inline auto capn_set(typename C::Builder& builder,
const CapnList<R, B, C>& info, const std::vector<T, A>& val)
-> enable_if_<std::is_arithmetic<T>::value>
-> enable_if_<std::is_arithmetic<T>::value || std::is_enum<T>::value>
{
auto p = capn_preprocess(val, select_overload());
const auto& ref = resolve_preprocess(p, val, select_overload());
Expand All @@ -419,7 +419,7 @@ inline auto capn_set(typename C::Builder& builder,

template<typename T, typename R, typename B, typename C, typename A>
inline auto capn_get(typename C::Reader& reader, const CapnList<R, B, C>& info,
std::vector<T, A>& val) -> enable_if_<std::is_arithmetic<T>::value>
std::vector<T, A>& val) -> enable_if_<std::is_arithmetic<T>::value || std::is_enum<T>::value>
{
auto list_reader{(reader.*(info.get))()};
val.resize(list_reader.size());
Expand Down

0 comments on commit bf21273

Please sign in to comment.