std::experi...gnedIntegral(3)
π std::experimental::ranges::SignedIntegral π
okay bestie, this is the std::experi...gnedIntegral(3) page from the C++ Standard Library manual, and we are about to get into a concept that is lowkey iconic β¨
πΈ NAME πΈ
std::experimental::ranges::SignedIntegral β yes, thatβs the whole name, and yeah, itβs repeated: std::experimental::ranges::SignedIntegral. she said it twice so you know sheβs serious π
π«Ά Synopsis π«Ά
Defined in header <experimental/ranges/concepts>
template< class T >
(ranges TS)
concept bool SignedIntegral = Integral<T> &&
std::is_signed<T>::value;
The concept SignedIntegral<T> is satisfied if and only if T is an integral type and std::is_signed<T>::value is true. periodt π
There need not be any subsumption relationship between SignedIntegral<T> and std::is_signed<T>::value. thatβs the rule, no cap.
π¦ Notes π¦
SignedIntegral<T> may be satisfied by a type that is not a signed integer type β for example, char on a system where char is signed. so yes, the vibe check can pass even when the type name is giving βnot exactly what you expectedβ π
π See also π
is_integralβ checks if a type is an integral type (C++11) (class template)is_signedβ checks if a type is a signed arithmetic type (C++11) (class template)
mwah π take care bestie, and remember: concepts are just fancy vibes with rules π β this cutie came from cppreference.com, version/date 2024.06.10.
π¦ 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