std::char_t...aits::move,(3)
πΈ NAME πΈ
okay so hiii bestie π this page is from the C++ Standard Libary manual, and the header title is std::char_t...aits::move,(3) β yes, the title got a lil abbreviated, weβre keeping it cute and exact.
the NAME line literally reads:
std::char_traits::move,std::char_traits::move, -
std::char_traits::move,std::char_traits::move,
slay, no edits, no cap π
π¦ Synopsis π¦
this is the whole signature vibe for std::char_traits<char32_t>::move, bestie:
std::char_traits<char32_t>::move
static char_type*
move( char_type* dest, const char_type* src,
(constexpr since C++20)
std::size_t count );
it copies count characters from the character string pointed to by src to the character string pointed to by dest π
and the iconic part? it performs correctly even if the ranges [src, src + count) and [dest, dest + count) overlap. overlap? not a problem, we ate π₯
see CharTraits for the general requirements on character traits for X::move.
πΈ Parameters πΈ
destβ pointer to a character string to copy tosrcβ pointer to a character string to copy fromcountβ the number of characters to copy
π Return value π
dest β thatβs the return, bestie π«Ά
π Exceptions π
throws nothing. literally nothing. silent treatment, but polite π
π₯ Complexity π₯
linear in count. so yeah, it scales with how many characters youβre moving β¨
π Defect reports π
the following behavior-changing defect reports were applied retroactively to previously published C++ standards:
LWG 7β applied toC++98.- behavior as published: the copy was guaranteed to perform correctly if
srcis in[dest, dest + count), but not the other way round (i.e.destis in[src, src + count)). - correct behavior: also guaranteed.
- behavior as published: the copy was guaranteed to perform correctly if
and thatβs the page, bestie π«Ά β source/version/date sign-off: http://cppreference.com, 2024.06.10, footer title std::char_t...aits::move,(3). periodt π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms