python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Why destructor is called if the return operation is elided?
I have the following code that mimics an elision testcase
class Obj
{
public:
int x = 0;
Obj(int y) : x(y) {std::cout << "C\n"; }
~Obj() { std::cout << "D\n"; }...
Matteo Galeotti
Votes: 0
Answers: 1
Why do relaxed atomic operations prevent compiler optimizations?
C++ compilers are allowed to elide or combine allocations. However, it seems that if allocated memory is accessed with atomic operations (even with relaxed memory order) that allocation cannot be elid...
Altan
Votes: 0
Answers: 1