首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::numeric_limits::is_integer

static const bool is_integer;

?

(until C++11)

static constexpr bool is_integer;

?

(since C++11)

价值std::numeric_limits<T>::is_integertrue对于所有整数算术类型Tfalse否则。这个常量对于所有的专门化都是有意义的。

标准专业化

T

value of std::numeric_limits<T>::is_integer

/* non-specialized */

false

bool

true

char

true

signed char

true

unsigned char

true

wchar_t

true

char16_t

true

char32_t

true

short

true

unsigned short

true

int

true

unsigned int

true

long

true

unsigned long

true

long long

true

unsigned long long

true

float

false

double

false

long double

false

另见

is_integral (C++11)

checks if a type is integral type (class template)

is_signed static

identifies signed types (public static member constant)

is_exact static

identifies exact types (public static member constant)

is_bounded static

identifies types that represent a finite set of values (public static member constant)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com