std::experi...8string,...(3)

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

πŸ’… std::experimental::filesystem::path::generic_string, generic_wstring, generic_u8string, ... β€” the C++ Standard Library's cppreference page, bestie edition

okay so this page lives in the C++ Standard Library section of the manual, and it's all about the generic_string fam β€” the whole squad of them. Same title, all the variants, one big glow-up of a function family. ✨


🌸 NAME 🌸

std::experimental::filesystem::path::generic_string,generic_wstring,generic_u8string,... β€” literally that. The whole crew. No notes. πŸ’…


πŸŽ€ Synopsis πŸŽ€

   template< class CharT, class Traits = std::char_traits<CharT>,

            class Alloc = std::allocator<CharT> >                (1)
(filesystem TS)
   std::basic_string<CharT,Traits,Alloc>

      generic_string( const Alloc& a = Alloc() ) const;
   std::string generic_string() const;
   std::wstring generic_wstring() const;
   std::string generic_u8string() const;                          (2)
(filesystem TS)
   std::u16string generic_u16string() const;
   std::u32string generic_u32string() const;

so basically, these return the internal pathname in generic pathname format, converted to a specific string type. Conversion, if there even is one, is specified in todo β€” yes bestie, the page literally says "todo", we don't make the rules 😭. And the / character is what's used as the directory separator. iconic behavior honestly.

  • (1) β€” all memory allocations are performed by a.
  • (2) β€” the encoding in the case of u8string() is always UTF-8. no cap.

πŸ¦‹ Parameters πŸ¦‹

  • a β€” the allocator to construct the string with. that's it, that's the whole job 🫢
  • and also: CharT must be one of the encoded character types (char, wchar_t, char16_t and char32_t). no random types allowed, vibe check failed if you try πŸ’€

⭐ Return value ⭐

The internal pathname in generic pathname format, converted to the specified string type.


πŸ’€ Exceptions πŸ’€

May throw implementation-defined exceptions. so like... unspecified chaos. stay safe out there πŸ™ˆ


πŸ‘‘ See also πŸ‘‘

  • string
  • wstring β€” returns the path in native pathname format converted to a string
  • u8string β€” (public member function)
  • u16string
  • u32string

🌈 Categories

  • Noindexed pages
  • Uses of dcl rev begin with nonempty note

and that's the whole page, bestie, we ate and left zero crumbs πŸ“βœ¨ source is http://cppreference.com, dated 2024.06.10, and this absolute icon of a page is filed under std::experi...8string,...(3) β€” mwah, periodt πŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from