Skip to content

Commit

Permalink
fix compile error on gcc 13: (#4932)
Browse files Browse the repository at this point in the history
The compilation fails due to an issue in the initializer list
of an optional argument, which holds a vector of pairs.
The code compiles correctly on earlier gcc versions, but fails on gcc 13.
  • Loading branch information
gregtatcam authored Feb 28, 2024
1 parent e718378 commit 8a2f6be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/rpc/GetAggregatePrice_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ class GetAggregatePrice_test : public beast::unit_test::suite
{
testcase("Errors");
using namespace jtx;
using Oracles = std::vector<std::pair<Account, std::uint32_t>>;
Account const owner{"owner"};
Account const some{"some"};
static std::vector<std::pair<Account, std::uint32_t>> oracles = {
{owner, 1}};
static Oracles oracles = {{owner, 1}};

{
Env env(*this);
Expand All @@ -62,7 +62,7 @@ class GetAggregatePrice_test : public beast::unit_test::suite
"Missing field 'oracles'.");

// empty oracles array
ret = Oracle::aggregatePrice(env, "XRP", "USD", {{}});
ret = Oracle::aggregatePrice(env, "XRP", "USD", Oracles{});
BEAST_EXPECT(ret[jss::error].asString() == "oracleMalformed");

// invalid oracle document id
Expand Down

0 comments on commit 8a2f6be

Please sign in to comment.