STD::CHRONO::TREAT_AS_FLOATING_POINT(3cxx)
πΈ NAME πΈ
std::chrono::treat_as_floating_point< _Rep > β from the 3cxx manual, bestie. That's the title + manual name folded in right here, no boring header line needed. This page is lowkey iconic for template besties π
.
π¦ SYNOPSIS π¦
#include <chrono>
Inherits std::is_floating_point< _Rep >.
π Detailed Description π
template<typename _Rep>
struct std::chrono::treat_as_floating_point< _Rep >
Okay so Trait indicating whether to treat a type as a floating-point type. That's the whole job. It's giving "is this a float or not" energy, fr fr.
The chrono library uses this trait to tell whether a duration can represent fractional values of the given precision, or only integral values. So yes, it's the vibe check for whether your duration can do fractions.
You should specialize this trait for your own numeric types that are used with duration and can represent non-integral values. Periodt β custom number types with fractional duration powers, this is your main character moment π«Ά.
β¨ Since β¨
C++11, no cap. π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. So it's not a human author, it's robot-generated realness π€π .
Mwah π β the footer's source/version is libstdc++ (manual section 3cxx), and there's no date printed on the page, so that's the whole sign-off tea. Bye bestie π¦π
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms