From a3f459dff4b9cc7aa9e5fc9c3296a21950fe78e7 Mon Sep 17 00:00:00 2001 From: Gregory Tsipenyuk Date: Thu, 19 Feb 2026 18:39:00 +0900 Subject: [PATCH] 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. --- src/test/rpc/GetAggregatePrice_test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/rpc/GetAggregatePrice_test.cpp b/src/test/rpc/GetAggregatePrice_test.cpp index 076a50443..4c45b7b9d 100644 --- a/src/test/rpc/GetAggregatePrice_test.cpp +++ b/src/test/rpc/GetAggregatePrice_test.cpp @@ -35,10 +35,10 @@ public: { testcase("Errors"); using namespace jtx; + using Oracles = std::vector>; Account const owner{"owner"}; Account const some{"some"}; - static std::vector> 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