diff options
author | 2023-05-16 10:32:54 +0000 | |
---|---|---|
committer | 2023-05-22 10:36:39 +0000 | |
commit | 78f3c72e8948087352788997a70854dee613352c (patch) | |
tree | 306db3c15bc4b7af149bcf3e07be533e50679b88 /cmdline/cmdline_parser_test.cc | |
parent | dc771261232c2ff702373f396a5a7fe586e2f0a6 (diff) |
Use C++17's [[maybe_unused]] attribute in ART
Bug: 169680875
Test: mmm art
Change-Id: Ic0cc320891c42b07a2b5520a584d2b62052e7235
Diffstat (limited to 'cmdline/cmdline_parser_test.cc')
-rw-r--r-- | cmdline/cmdline_parser_test.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cmdline/cmdline_parser_test.cc b/cmdline/cmdline_parser_test.cc index effbee93c7..4d53857a09 100644 --- a/cmdline/cmdline_parser_test.cc +++ b/cmdline/cmdline_parser_test.cc @@ -75,12 +75,13 @@ namespace art { // that are nevertheless equal. // If a test is failing because the structs aren't "equal" when they really are // then it's recommended to implement operator== for it instead. - template <typename T, typename ... Ignore> - bool UsuallyEquals(const T& expected, const T& actual, - const Ignore& ... more ATTRIBUTE_UNUSED, - typename std::enable_if<std::is_pod<T>::value>::type* = nullptr, - typename std::enable_if<!detail::SupportsEqualityOperator<T>::value>::type* = nullptr - ) { + template <typename T, typename... Ignore> + bool UsuallyEquals( + const T& expected, + const T& actual, + [[maybe_unused]] const Ignore&... more, + typename std::enable_if<std::is_pod<T>::value>::type* = nullptr, + typename std::enable_if<!detail::SupportsEqualityOperator<T>::value>::type* = nullptr) { return memcmp(std::addressof(expected), std::addressof(actual), sizeof(T)) == 0; } |