std::filesy...::path::swap(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

🌸 std::filesystem::path::swap πŸ’…

okay bestie, welcome to the std::filesystem::path::swap(3) page β€” yes it's from the C++ Standard Libary (that's the manual name, we don't fix typos here, we respect the lore 🫢), and yes it's exactly as iconic as it sounds. sit down, sip ur drink, let's get into it ✨


✨ NAME ✨

std::filesystem::path::swap β€” literally just std::filesystem::path::swap, no notes, that's the whole name, periodt πŸ’…


πŸ¦‹ Synopsis πŸ¦‹

void swap( path& other ) noexcept; (1) (since C++17)

so this bad boy swaps the contents of *this and other β€” and when we say contents we mean both the native format and the generic format, like a full glow-up trade, no cap πŸ’–

ngl the noexcept is right there in the signature and she's thriving β€” this one is not gonna throw at you 🌈

πŸŽ€ Parameters πŸŽ€

  • other β€” another path to exchange the contents with 🧚 like, ur swapping ur whole vibe with hers, mutual main character energy

⭐ Return value ⭐

(none) β€” she gives you nothing back because the swapping is the gift, iykyk πŸ’œ


πŸ”₯ Complexity πŸ”₯

Constant. constant!! not linear, not "depends on ur mood", Constant β€” she ate and left zero crumbs πŸ‘‘


🌸 See also 🌸

  • swap(std::filesystem::path) β€” swaps two paths πŸ’« (C++17) (function)

ok that's the whole page, short and slay and to the point πŸ’€βœ¨ this one came straight from http://cppreference.com, dated 2024.06.10, and honestly? iconic of them. bye bestie, go swap some paths responsibly πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from