<xstring>
: conversion between basic_string
specializations could sometimes memcpy
#2901
Labels
<xstring>
: conversion between basic_string
specializations could sometimes memcpy
#2901
For example:
could all be implemented with
memcpy
. At the very least, this should happen when initializingstd::basic_string<char, std::char_traits<char>>
fromstd::basic_string<T, std::char_traits<T>>
whenT
is an integral type with size 1. More generally, I think this optimization could apply when the source and target element types are integral types of the same size and the target traits type is library-provided.The text was updated successfully, but these errors were encountered: