Skip to content

Commit aeba70e

Browse files
birdx-007Timothy-Liuxf
authored andcommitted
fix: add std::launch::async in "std::future" for moderncpp docs.
1 parent e7c9083 commit aeba70e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/languages/C&C++/modern_cpp.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ void critical_section(int change_v) {
951951
#include <future>
952952
953953
int main(){
954-
auto result = std::async([](){return 7;});
954+
auto result = std::async(std::launch::async, [](){return 7;});
955955
std::cout << "waiting..." << std::endl;
956956
std::cout << "future result is " << result.get() << std::endl;
957957
return 0;

0 commit comments

Comments
 (0)