Skip to content

Commit

Permalink
Remove include <ranges>
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronek committed Oct 25, 2023
1 parent 1eac4d2 commit 65346dc
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/test/jtx/TestHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,25 @@
#include <ripple/protocol/jss.h>
#include <test/jtx/Env.h>

#include <ranges>
#include <vector>

namespace ripple {
namespace test {
namespace jtx {

// Helper to make vector from iterable
template <typename T>
concept iterable = requires(T& v) {
std::begin(v);
std::end(v);
};

template <typename Input>
auto
make_vector(auto const& input) requires std::ranges::range<decltype(input)>
make_vector(Input const& input)
requires iterable<Input>
{
return std::vector(std::ranges::begin(input), std::ranges::end(input));
return std::vector(std::begin(input), std::end(input));
}

// Functions used in debugging
Expand Down

0 comments on commit 65346dc

Please sign in to comment.