Add support for c++17 tuple destructuring (#487)
C++17 adds support for tuple destructuring. This allow one to write code such as: ``` std::pair<int, int> span = getSpan(); auto [start, end] = span; // Use start as span.first and end as span.second ``` This makes cpplint recognize and allow a space before the '[' in this situation. This is a purposeful divergence from the internal version where the entire whitespace/braces category was removed. It was decided to leave the checks in since this is sometimes used without other formatting tools. Test: manual (cherry picked from commit 26470f9ccb354ff2f6d098f831271a1833701b28 from https://github.com/google/styleguide) Bug: 1287491 Change-Id: Ib61a75853e19316b1bacf8dc56528f94c17e30a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3389431Reviewed-by:Anthony Polito <apolito@google.com> Commit-Queue: Victor Boivie <boivie@google.com>
Showing
Please
register
or
sign in
to comment