Quantcast
Channel: in-class initialization of atomic - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by Jarod42 for in-class initialization of atomic

$
0
0
atomic<int> x = 1; // not an assignment.

is

atomic<int> x{atomic<int>{1}};

whereas

atomic<int> x;x = 1; // assignment

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>