aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Gierlings <[email protected]>2017-11-23 00:21:32 +0100
committerMatthias Gierlings <[email protected]>2017-11-23 00:42:28 +0100
commitf504a76e3409e16da9701adaa4a297724ae0e4b1 (patch)
treec5fd9e6ec05b863d852744d808e00fa3751b4e5f
parent0e28426ca870e1e560b0f89baad92071f6813c4e (diff)
Fixes lambda capture error in MSVC
MSVC seems to not allow defining aliases inside lambda capture expressions. Defining the aliases beforehand, outside the lambda fixes the issue.
-rw-r--r--src/lib/pubkey/xmss/xmss_tools.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/pubkey/xmss/xmss_tools.cpp b/src/lib/pubkey/xmss/xmss_tools.cpp
index 24553b144..7a34dc0a9 100644
--- a/src/lib/pubkey/xmss/xmss_tools.cpp
+++ b/src/lib/pubkey/xmss/xmss_tools.cpp
@@ -42,8 +42,10 @@ size_t XMSS_Tools::bench_threads()
auto start = std::chrono::high_resolution_clock::now();
for(size_t i = 0; i < cc; ++i)
{
+ auto& hs = hash[i];
+ auto& d = data[i];
threads.emplace_back(
- std::thread([&i, &cc, &hs = hash[i], &d = data[i]]()
+ std::thread([&BENCH_ITERATIONS, &i, &cc, &hs, &d]()
{
for(size_t n = 0;
n < BENCH_ITERATIONS * (std::thread::hardware_concurrency() /