mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
fix compile error on gcc 13: (#4932)
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.
This commit is contained in:
committed by
GitHub
parent
e718378bdb
commit
8a2f6bec33
@@ -35,10 +35,10 @@ public:
|
||||
{
|
||||
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);
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
"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
|
||||
|
||||
Reference in New Issue
Block a user