diff --git a/src/test/jtx/TestHelpers.h b/src/test/jtx/TestHelpers.h index 61d0eb87f9f..7ebc522ca4e 100644 --- a/src/test/jtx/TestHelpers.h +++ b/src/test/jtx/TestHelpers.h @@ -33,17 +33,17 @@ namespace ripple { namespace test { namespace jtx { -// Helper to make vector from iterable -template -concept iterable = requires(T& v) -{ - std::begin(v); - std::end(v); -}; - +// TODO We only need this long "requires" clause as polyfill, for C++20 +// implementations which are missing header. Replace with +// `std::ranges::range`, and accordingly use std::ranges::begin/end +// when we have moved to better compilers. template auto -make_vector(Input const& input) requires iterable +make_vector(Input const& input) + requires requires(Input& v) { + std::begin(v); + std::end(v); + } { return std::vector(std::begin(input), std::end(input)); }