Use RANGE macro to abbreviate begin/end pairs (#1269)

This commit is contained in:
Rangi
2023-12-11 14:10:20 -05:00
committed by GitHub
parent b886b7e611
commit 495d701022
7 changed files with 40 additions and 43 deletions

View File

@@ -82,4 +82,7 @@
// (Having two instances of `arr` is OK because the contents of `sizeof` are not evaluated.)
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof *(arr))
// For lack of <ranges>, this adds some more brevity
#define RANGE(s) std::begin(s), std::end(s)
#endif // HELPERS_H