Skip to content

Commit 25b9296

Browse files
committed
Fixed compile warnings related to deprecated std::bind1st, and surrounding whitespace
1 parent 2139889 commit 25b9296

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

libfqfft/polynomial_arithmetic/basic_operations.tcc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Implementation of interfaces for basic polynomial operation routines.
55
66
See basic_operations.hpp .
7-
7+
88
*****************************************************************************
99
* @author This file is part of libfqfft, developed by SCIPR Lab
1010
* and contributors (see AUTHORS).
@@ -75,7 +75,7 @@ void _polynomial_addition(std::vector<FieldT> &c, const std::vector<FieldT> &a,
7575
std::copy(b.begin() + a_size, b.end(), c.begin() + a_size);
7676
}
7777
}
78-
78+
7979
_condense(c);
8080
}
8181

@@ -95,7 +95,7 @@ void _polynomial_subtraction(std::vector<FieldT> &c, const std::vector<FieldT> &
9595
{
9696
size_t a_size = a.size();
9797
size_t b_size = b.size();
98-
98+
9999
if (a_size > b_size)
100100
{
101101
c.resize(a_size);
@@ -148,7 +148,11 @@ void _polynomial_multiplication_on_fft(std::vector<FieldT> &c, const std::vector
148148
#endif
149149

150150
const FieldT sconst = FieldT(n).inverse();
151-
std::transform(c.begin(), c.end(), c.begin(), std::bind1st(std::multiplies<FieldT>(), sconst));
151+
std::transform(
152+
c.begin(),
153+
c.end(),
154+
c.begin(),
155+
std::bind(std::multiplies<FieldT>(), sconst, std::placeholders::_1));
152156
_condense(c);
153157
}
154158

libfqfft/polynomial_arithmetic/xgcd.tcc

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Implementation of interfaces for extended GCD routines.
55
66
See xgcd.hpp .
7-
7+
88
*****************************************************************************
99
* @author This file is part of libfqfft, developed by SCIPR Lab
1010
* and contributors (see AUTHORS).
@@ -58,9 +58,21 @@ void _polynomial_xgcd(const std::vector<FieldT> &a, const std::vector<FieldT> &b
5858
_polynomial_division(V1, R, V3, b);
5959

6060
FieldT lead_coeff = G.back().inverse();
61-
std::transform(G.begin(), G.end(), G.begin(), std::bind1st(std::multiplies<FieldT>(), lead_coeff));
62-
std::transform(U.begin(), U.end(), U.begin(), std::bind1st(std::multiplies<FieldT>(), lead_coeff));
63-
std::transform(V1.begin(), V1.end(), V1.begin(), std::bind1st(std::multiplies<FieldT>(), lead_coeff));
61+
std::transform(
62+
G.begin(),
63+
G.end(),
64+
G.begin(),
65+
std::bind(std::multiplies<FieldT>(), lead_coeff, std::placeholders::_1));
66+
std::transform(
67+
U.begin(),
68+
U.end(),
69+
U.begin(),
70+
std::bind(std::multiplies<FieldT>(), lead_coeff, std::placeholders::_1));
71+
std::transform(
72+
V1.begin(),
73+
V1.end(),
74+
V1.begin(),
75+
std::bind(std::multiplies<FieldT>(), lead_coeff, std::placeholders::_1));
6476

6577
g = G;
6678
u = U;

0 commit comments

Comments
 (0)