From 6f219baafaa73bb6d47607f69816caaff3b8f56b Mon Sep 17 00:00:00 2001 From: Andrei Malashkin Date: Sun, 22 Sep 2024 10:35:36 +0200 Subject: [PATCH] fix parallel-crypto3 tests affected by clang-19 --- .../include/nil/crypto3/container/merkle/tree.hpp | 6 +++--- .../include/nil/crypto3/math/polynomial/polynomial.hpp | 4 ++-- .../nil/crypto3/math/polynomial/polynomial_dfs.hpp | 4 ++-- .../crypto3/math/polynomial/polynomial_dfs_view.hpp | 8 ++++---- .../nil/crypto3/math/polynomial/polynomial_view.hpp | 8 ++++---- .../ppzksnark/r1cs_gg_ppzksnark/ipp2/verifier.hpp | 10 +++++----- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/parallel-crypto3/libs/parallel-containers/include/nil/crypto3/container/merkle/tree.hpp b/parallel-crypto3/libs/parallel-containers/include/nil/crypto3/container/merkle/tree.hpp index 1fcf812596..cc6933af1c 100644 --- a/parallel-crypto3/libs/parallel-containers/include/nil/crypto3/container/merkle/tree.hpp +++ b/parallel-crypto3/libs/parallel-containers/include/nil/crypto3/container/merkle/tree.hpp @@ -397,12 +397,12 @@ namespace nil { // template reference emplace_back(Args &&..._args) { - return _hashes.template emplace_back(_args...); + return _hashes.template emplace_back<>(_args...); } template iterator emplace(const_iterator _position, Args &&... _args) { - return _hashes.template emplace(_position, _args...); + return _hashes.template emplace<>(_position, _args...); } void pop_back() { @@ -424,7 +424,7 @@ namespace nil { void swap(merkle_tree_impl &other) { _hashes.swap(other.hashes()); std::swap(_leaves, other.leaves()); - std::swap(_rc, other.rc()); + std::swap(_rc, other.row_count()); std::swap(_size, other.size()); } diff --git a/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial.hpp b/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial.hpp index a3fcbe2209..53828a351c 100644 --- a/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial.hpp +++ b/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial.hpp @@ -313,7 +313,7 @@ namespace nil { template reference emplace_back(Args&&... _args) { - return val.template emplace_back(_args...); + return val.template emplace_back<>(_args...); } void pop_back() { @@ -330,7 +330,7 @@ namespace nil { template iterator emplace(const_iterator _position, Args&&... _args) { - return val.template emplace(_position, _args...); + return val.template emplace<>(_position, _args...); } iterator insert(const_iterator _position, size_type _n, const_reference _x) { diff --git a/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial_dfs.hpp b/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial_dfs.hpp index 24bcd40faf..4d1aa32400 100644 --- a/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial_dfs.hpp +++ b/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial_dfs.hpp @@ -290,7 +290,7 @@ namespace nil { template reference emplace_back(Args&&... _args) { - return val.template emplace_back(_args...); + return val.template emplace_back<>(_args...); } void pop_back() { @@ -306,7 +306,7 @@ namespace nil { } template iterator emplace(const_iterator _position, Args&&... _args) { - return val.template emplace(_position, _args...); + return val.template emplace<>(_position, _args...); } iterator insert(const_iterator _position, size_type _n, const_reference _x) { diff --git a/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial_dfs_view.hpp b/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial_dfs_view.hpp index 2ba563f2ad..e358eece61 100644 --- a/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial_dfs_view.hpp +++ b/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial_dfs_view.hpp @@ -102,7 +102,7 @@ namespace nil { // } bool operator==(const polynomial_dfs_view& rhs) const { - return (*it) == (*(rhs.it)) && _d == rhs.d; + return (*it) == (*(rhs.it)) && _d == rhs.data(); } bool operator!=(const polynomial_dfs_view& rhs) const { return !(rhs == *this); @@ -239,7 +239,7 @@ namespace nil { template reference emplace_back(Args&&... _args) { - return it.template emplace_back(_args...); + return it.template emplace_back<>(_args...); } void pop_back() { @@ -255,7 +255,7 @@ namespace nil { } template iterator emplace(const_iterator _position, Args&&... _args) { - return it.template emplace(_position, _args...); + return it.template emplace<>(_position, _args...); } iterator insert(const_iterator _position, size_type _n, const_reference _x) { @@ -309,7 +309,7 @@ namespace nil { // } void swap(polynomial_dfs_view& other) { - it.swap(other.val); + it.swap(other.data()); std::swap(_d, other._d); } diff --git a/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial_view.hpp b/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial_view.hpp index 236a5893b9..a3f9cea65c 100644 --- a/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial_view.hpp +++ b/parallel-crypto3/libs/parallel-math/include/nil/crypto3/math/polynomial/polynomial_view.hpp @@ -233,7 +233,7 @@ namespace nil { template reference emplace_back(Args&&... _args) { - return it.template emplace_back(_args...); + return it.template emplace_back<>(_args...); } void pop_back() { @@ -249,7 +249,7 @@ namespace nil { } template iterator emplace(const_iterator _position, Args&&... _args) { - return it.template emplace(_position, _args...); + return it.template emplace<>(_position, _args...); } iterator insert(const_iterator _position, size_type _n, const_reference _x) { @@ -286,7 +286,7 @@ namespace nil { } void swap(polynomial_view& other) { - it.swap(other.val); + it.swap(other.data()); } template @@ -408,7 +408,7 @@ namespace nil { } nil::crypto3::math::condense(q); - this->template assign(q.begin(), q.end()); + this->template assign<>(q.begin(), q.end()); return *this; } diff --git a/parallel-crypto3/libs/parallel-zk/include/nil/crypto3/zk/snark/systems/ppzksnark/r1cs_gg_ppzksnark/ipp2/verifier.hpp b/parallel-crypto3/libs/parallel-zk/include/nil/crypto3/zk/snark/systems/ppzksnark/r1cs_gg_ppzksnark/ipp2/verifier.hpp index 67b3937ac5..163be38232 100644 --- a/parallel-crypto3/libs/parallel-zk/include/nil/crypto3/zk/snark/systems/ppzksnark/r1cs_gg_ppzksnark/ipp2/verifier.hpp +++ b/parallel-crypto3/libs/parallel-zk/include/nil/crypto3/zk/snark/systems/ppzksnark/r1cs_gg_ppzksnark/ipp2/verifier.hpp @@ -508,15 +508,15 @@ namespace nil { pc.merge_random(a_input1.begin(), a_input1.end(), b_input1.begin(), b_input1.end(), final_res.zab); // final_aB.0 = T = e(A,v1)e(w1,B) - a_input1.template emplace_back(proof.tmipp.gipa.final_wkey.first); - b_input1.template emplace(b_input1.begin(), proof.tmipp.gipa.final_vkey.first); + a_input1.template emplace_back<>(proof.tmipp.gipa.final_wkey.first); + b_input1.template emplace<>(b_input1.begin(), proof.tmipp.gipa.final_vkey.first); pc.merge_random(a_input1.begin(), a_input1.end(), b_input1.begin(), b_input1.end(), final_res.tab); // final_aB.1 = U = e(A,v2)e(w2,B) a_input1.pop_back(); - a_input1.template emplace_back(proof.tmipp.gipa.final_wkey.second); + a_input1.template emplace_back<>(proof.tmipp.gipa.final_wkey.second); b_input1.erase(b_input1.begin()); - b_input1.template emplace(b_input1.begin(), proof.tmipp.gipa.final_vkey.second); + b_input1.template emplace<>(b_input1.begin(), proof.tmipp.gipa.final_vkey.second); pc.merge_random(a_input1.begin(), a_input1.end(), b_input1.begin(), b_input1.end(), final_res.uab); // MIPP @@ -536,7 +536,7 @@ namespace nil { // U = e(A,v2) b_input2.pop_back(); - b_input2.template emplace_back(proof.tmipp.gipa.final_vkey.second); + b_input2.template emplace_back<>(proof.tmipp.gipa.final_vkey.second); pc.merge_random(a_input2.begin(), a_input2.end(), b_input2.begin(), b_input2.end(), final_res.uc); if (final_z != final_res.zc) {