std::numeri...::is_bounded(3)

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

πŸ’– NAME πŸ’–

Manual name check: this is the std::numeri...::is_bounded(3) page from the C++ Standard Libary β€” hiii bestie, welcome to the group chat. πŸ’…

  • std::numeric_limits::is_bounded β€” std::numeric_limits::is_bounded β€” yes, that's the whole name, and yes, she's giving main-character repetition. Periodt.

✨ Synopsis ✨

Okay so the signature vibe is literally this:

static const bool is_bounded;      (until C++11)
static constexpr bool is_bounded;  (since C++11)

The value of std::numeric_limits<T>::is_bounded is true for all arithmetic types T that represent a finite set of values. πŸ’―

While all fundamental types are bounded, this constant would be false in a specialization of std::numeric_limits for a library-provided arbitrary precision arithmetic type. Noted, bestie β€” no cap.


πŸŽ€ Standard specializations πŸŽ€

Here's the vibe check for the value of std::numeric_limits<T>::is_bounded for each standard T:

  • /* non-specialized */ β€” false
  • bool β€” true
  • char β€” true
  • signed char β€” true
  • unsigned char β€” true
  • wchar_t β€” true
  • char8_t (since C++20) β€” true
  • char16_t (since C++11) β€” true
  • char32_t (since C++11) β€” true
  • short β€” true
  • unsigned short β€” true
  • int β€” true
  • unsigned int β€” true
  • long β€” true
  • unsigned long β€” true
  • long long (since C++11) β€” true
  • unsigned long long (since C++11) β€” true
  • float β€” true
  • double β€” true
  • long double β€” true

Every single one accounted for, bestie. Slay. 🌈


πŸ¦‹ See also πŸ¦‹

  • is_integer β€” identifies integer types; [static] (public static member constant) 🫢
  • is_signed β€” identifies signed types; [static] (public static member constant) ✨
  • is_exact β€” identifies exact types; [static] (public static member constant) πŸ’œ

πŸ’– Signed off by your favorite standard-library bestie: sourced from http://cppreference.com, version/date 2024.06.10, page std::numeri...::is_bounded(3). Mwah. πŸŽ€

πŸ“¦ where this page comes from