- cstdint[meta header]
- macro[meta id-type]
- cpp11[meta cpp]
# define WCHAR_MAX implementation-defined
wchar_t
の最大値。
wchar_t
が符号付き整数型として定義される場合、このマクロの値は127以上となる。そうでない場合、このマクロの値は255以上となる。
#include <iostream>
#include <cstdint>
int main()
{
wchar_t max_value = WCHAR_MAX;
std::cout << static_cast<long long>(max_value) << std::endl;
}
- WCHAR_MAX[color ff0000]
2147483647
- C++11
- Clang C++11 mode: 3.2
- GCC, C++11 mode: 4.3
- ICC: ??
- Visual C++: 2010, 2012, 2013, 2015, 2017