| Issue |
161858
|
| Summary |
Access checks and copy elision before c++17
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
cor3ntin
|
We claim to support guaranteed copy elision in C++03, but we still perform access checks for copy constructors (before c++17)
https://godbolt.org/z/WPEh8e94c
```cpp
class S {
public:
S(int, int);
// private:
S(const S &);
};
S s = S(0, 0);
```
If we make the constructor public, RVO is performed https://godbolt.org/z/WPEh8e94c
Aditionally `__cpp_guaranteed_copy_elision` is not set even if the documentation claim it should be
https://clang.llvm.org/docs/LanguageExtensions.html#id34
Maybe the documentation is just wrong.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs