Type traits (<type_traits>)
Në shqip përdoret i njëjti emër.
ShpjegimiSQ
<type_traits> të lejon të pyesësh për tipet gjatë kompajlimit: std::is_integral_v<T>, std::is_same_v<A, B>, std::remove_const_t<T>. Përdoren shumë në template.
EnglishEN
<type_traits> lets you ask about types at compile time: std::is_integral_v<T>, std::is_same_v<A, B>, std::remove_const_t<T>. They're used a lot in templates.
Si ta mendosh
Si një formular që e plotëson kompajleri për çdo tip.
Lexoje në anglisht
Like a form the compiler fills in for each type.
Shembull kodicpp
static_assert(std::is_integral_v<int>);
static_assert(!std::is_integral_v<double>);