Skip to content

Commit

Permalink
skymarshal: Fix build for eigen >= 3.4
Browse files Browse the repository at this point in the history
In eigen 3.4, matrix<> gets iterators, which means our
previous method of distinguishing matrices from other iterables
no longer works. Switch to using ::pointer, which exists for
arrays and vectors but not eigen types as they're not
guaranteed to have any particular layout.

Existing lcm tests pass.

GitOrigin-RevId: bc7b5233116d3ee8074cdfcbed22922859cf6902
  • Loading branch information
jerry-skydio authored and aaron-skydio committed Feb 21, 2024
1 parent 7c7bbde commit 9d965f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third_party/skymarshal/include/lcm/lcm_json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ template <typename T, typename = void>
struct is_iterable : std::false_type {};

template <typename T>
struct is_iterable<T, typename std::conditional<false, typename T::iterator, void>::type>
struct is_iterable<T, typename std::conditional<false, typename T::pointer, void>::type>
: public std::true_type {};

template <typename T>
Expand Down

0 comments on commit 9d965f8

Please sign in to comment.