To inialize for example Eigen::Matrix3i
we can use syntax:
Eigen::Matrix3i T;
T << 1, 0, 0,
0, 2, 0,
0, 0, 3;
However, when using clang-format
(3.6 in my case) with Google
style this nice initialization turns into:
Eigen::Matrix3i T;
T << 1, 0, 0, 0, 2, 0, 0, 0, 3;
Is there an easy way to avoid this? Is there a way to tell clang-format
to skip something like this?
It looks like your only option is to use a rather ugly clang-format switching syntax:
Eigen::Matrix3i T;
// clang-format off
T << 1, 0, 0,
0, 2, 0,
0, 0, 3;
// clang-format on
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With