This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/80335] perf of copying std::optional<trivial>


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80335

sgunderson at bigfoot dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sgunderson at bigfoot dot com

--- Comment #1 from sgunderson at bigfoot dot com ---
This also affects the _returning_ std::optional; since it is not trivially copy
constructible, std::optional<int> must be returned (at least on amd64) by means
of a hidden parameter instead of in registers.

Since this affects the return type ABI, it can't be changed easily
after-the-fact, so if possible, it should be fixed before C++17 support becomes
non-experimental.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]