std::numeric_limits::is_exact

static const bool is_exact;
(C++11 前)
static constexpr bool is_exact;
(C++11 起)

std::numeric_limits<T>::is_exact 的值对所有使用准确表示的算术类型 Ttrue

标准特化

T std::numeric_limits<T>::is_exact 的值
/* 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

注意

尽管对于所有 std::numeric_limits<T>::is_exact==true 的基础类型 T 都是整数类型,库可以定义非整数的准确类型,例如表示分数的有理数算术类型。

参阅

[静态]
鉴别整数类型
(公开静态成员常量)
[静态]
鉴别有符号类型
(公开静态成员常量)
[静态]
鉴别表示有限值集合的类型
(公开静态成员常量)

版本历史

  • (当前 | 先前 2017年4月26日 (三) 01:36Fruderica讨论 | 贡献. . (1,859字节) (-696). . (撤销)
  • 当前 | 先前 2013年7月2日 (二) 11:47P12bot讨论 | 贡献 . . (2,555字节) (-322). . (Use {{lc}}. Update links. Various fixes.) (撤销)
  • 当前 | 先前 2012年11月2日 (五) 15:11P12bot讨论 | 贡献 . . (2,877字节) (+329). . (r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru) (撤销)
  • 当前 | 先前 2012年10月27日 (六) 12:11P12讨论 | 贡献 . . (2,548字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 06:00TranslationBot讨论 | 贡献. . (2,548字节) (-32). . (Translated from the English version using Google Translate) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 03:53P12讨论 | 贡献 . . (2,580字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前) 2012年10月25日 (四) 12:00TranslationBot讨论 | 贡献. . (2,580字节) (+2,580). . (Translated from the English version using Google Translate)