2 Comments
User's avatar
Yacob Cohen-Arazi's avatar

So there is no elision happening ? is it because of existing defs of the special members? Even copy init could be elided, at least that is what I thought but I might be wrong. I believe you are using 17+ here? thank you again for the post.

Expand full comment
Taras Tsugrii's avatar

nope and it's not allowed to happen according to spec I've quoted at the end of the article :( Well, it's clearly not happening in practice, so even if it's supposed to happen in theory, we care more about practical implications.

Yes, I'm using C++17 but the same happens in 20 - https://godbolt.org/z/MWKs7cb8v. You are always very welcome!

Expand full comment