Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove include <ranges> #4788

Merged
merged 3 commits into from
Oct 30, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading