std::chrono::local_info(3)

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

okay bestie, welcome to the std::chrono::local_info(3) page, straight from the C++ Standard Libary πŸ’… this one is a whole little low-level vibe, so let's get into it ✨

πŸ’– NAME πŸ’–

std::chrono::local_info β€” std::chrono::local_info. that's literally the name section doing its mirror thing πŸͺž iconic, we move.

✨ Synopsis ✨

Defined in header <chrono>
struct local_info;          (since C++20)

okay so the class local_info describes the result of converting a std::chrono::local_time to a std::chrono::sys_time. no cap, that's the whole main-character job 🌟

  • if the result of the conversion is unique, then result == local_info::unique, first is filled out with the correct std::chrono::sys_info, and second is zero-initialized. clean, simple, slay ✨
  • if the local_time is nonexistent, then result == local_info::nonexistent, first is filled out with the std::chrono::sys_info that ends just prior to the local_time, and second is filled out with the std::chrono::sys_info that begins just after the local_time. that time kinda ghosted the timeline πŸ‘»
  • if the local_time is ambiguous, then result == local_info::ambiguous, first is filled out with the std::chrono::sys_info that ends just after the local_time, and second is filled with the std::chrono::sys_info that starts just before the local_time. two timings, one moment, the drama of it all 😭
lowkey important: this is a low-level data structure; typical conversions from local_time to sys_time will use it implicitly rather than explicitly. so it's giving backstage crew, not main-stage energy πŸŽ€

πŸŽ€ Member constants πŸŽ€

name β†’ value, and yes they're all [static] (public static member constant), periodt:

  • constexpr int unique β€” value 0; [static] (public static member constant).
  • constexpr int nonexistent β€” value 1; [static] (public static member constant).
  • constexpr int ambiguous β€” value 2; [static] (public static member constant).

πŸ¦‹ Member objects πŸ¦‹

  • result β€” type int.
  • first, second β€” type std::chrono::sys_info.

🌸 Nonmember functions 🌸

  • operator<< β€” outputs a local_info into a stream. (C++20) Β· (function template).

πŸ’œ Helper classes πŸ’œ

  • std::formatter<std::chrono::local_info> β€” formatting support for local_info. (C++20) Β· (class template specialization).

source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::chrono::local_info(3) β€” mwah, bestie, go forth and convert responsibly πŸ’‹

πŸ“¦ where this page comes from