Answer by Brian Bi for How do you create a std::pair containing a std::atomic?
You can do:std::pair<std::atomic<bool>, int> p(true, 1);This uses true to initialize the atomic first member, without any extraneous copies or moves. In C++17, guaranteed copy elision also...
View ArticleHow do you create a std::pair containing a std::atomic?
I cannot figure out how to create the following:std::pair<std::atomic<bool>, int>I always invariably get/usr/include/c++/5.5.0/bits/stl_pair.h:139:45: error: use of deleted function...
View Article
More Pages to Explore .....