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