[Bug libstdc++/99789] std::span or std::string_view are not zero-overhead on microsoft abi
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 26 12:35:21 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99789
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Bugzilla is for reporting bugs, not for general programming advices.
There is no bug here, the C++ standard for 64-bit architectures with its
requirements on std::string_view etc. effectively mandates that the class
stores a pointer and size which better should be also size_t and not something
narrower.
And you or your users made a choice of some ABI where passing this by value
means it is not passed in registers.
More information about the Gcc-bugs
mailing list