Quantcast
Channel: Why does std::atomic constructor behave different in C++14 and C++17 - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Rinat Veliakhmedov for Why does std::atomic constructor behave...

Because in C++17 there is a guaranteed RVO. In C++14 statements like Foo x = Foo(args) and Foo x (args) are technically not the same, but they are in C++17. struct Foo { Foo() = default; Foo(const...

View Article



Why does std::atomic constructor behave different in C++14 and C++17

I'm working in a project with C++11 and I tried following code#include <atomic>struct A { std::atomic_int idx = 1;};int main() { return 0;}I get the compiler errorerror: use of deleted function...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images