We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building chapter 11 fails with the following errors on MSVC 2019:
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\barrier(76,13): error C2338: N4861 [thread.barrier.class]/5: is_nothrow_invocable_v<CompletionFunction&> shall be true 1>C:\temp\Cpp-High-Performance-Second-Edition-master\Chapter11\barriers.cpp(38): message : see reference to class template instantiation 'std::barrier<Barriers_ForkJoin_Test::TestBody::<lambda_1>>' being compiled 1>Done building project "Chapter11-Concurrency.vcxproj" -- FAILED.
This is due to the check_result function not being declared noexcept:
check_result
noexcept
auto check_result = [&] { // Completion function ++n_turns; auto is_six = [](auto i) { return i == 6; }; done = std::all_of(dice.begin(), dice.end(), is_six); }; auto bar = std::barrier{n, check_result};
To fix the issue, change it to auto check_result = [&] () noexcept { ... }.
auto check_result = [&] () noexcept { ... }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Building chapter 11 fails with the following errors on MSVC 2019:
This is due to the
check_result
function not being declarednoexcept
:To fix the issue, change it to
auto check_result = [&] () noexcept { ... }
.The text was updated successfully, but these errors were encountered: