diff options
author | Matthias Gierlings <[email protected]> | 2017-11-23 00:21:32 +0100 |
---|---|---|
committer | Matthias Gierlings <[email protected]> | 2017-11-23 00:42:28 +0100 |
commit | f504a76e3409e16da9701adaa4a297724ae0e4b1 (patch) | |
tree | c5fd9e6ec05b863d852744d808e00fa3751b4e5f /src/lib | |
parent | 0e28426ca870e1e560b0f89baad92071f6813c4e (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.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/pubkey/xmss/xmss_tools.cpp | 4 |
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() / |