C++ åèæå
- C++11
- C++14
- C++17
- C++20
- C++ ç¼è¯å¨æ¯ææ åµè¡¨
- ç¬ç«ä¸å®¿ä¸»å®ç°
- C++ è¯è¨
- C++ å ³é®è¯
- é¢å¤çå¨
- C++ æ ååºå¤´æä»¶
- æ ååºå¤´æä»¶ <ctime>
- æ ååºå¤´æä»¶ <cstring>
- æ ååºå¤´æä»¶ <set>
- æ ååºå¤´æä»¶ <cctype>
- æ ååºå¤´æä»¶ <cwctype>
- æ ååºå¤´æä»¶ <utility>
- æ ååºå¤´æä»¶ <queue>
- æ ååºå¤´æä»¶ <complex>
- æ ååºå¤´æä»¶ <iterator>
- æ ååºå¤´æä»¶ <algorithm>
- æ ååºå¤´æä»¶ <valarray>
- æ ååºå¤´æä»¶ <numeric>
- æ ååºå¤´æä»¶ <cmath>
- æ ååºå¤´æä»¶ <iosfwd>
- æ ååºå¤´æä»¶ <ios>
- æ ååºå¤´æä»¶ <iomanip>
- æ ååºå¤´æä»¶ <streambuf>
- æ ååºå¤´æä»¶ <istream>
- æ ååºå¤´æä»¶ <ostream>
- æ ååºå¤´æä»¶ <iostream>
- æ ååºå¤´æä»¶ <sstream>
- æ ååºå¤´æä»¶ <clocale>
- æ ååºå¤´æä»¶ <vector>
- æ ååºå¤´æä»¶ <deque>
- æ ååºå¤´æä»¶ <list>
- æ ååºå¤´æä»¶ <map>
- æ ååºå¤´æä»¶ <cwchar>
- æ ååºå¤´æä»¶ <locale>
- æ ååºå¤´æä»¶ <codecvt>
- æ ååºå¤´æä»¶ <bitset>
- æ ååºå¤´æä»¶ <functional>
- æ ååºå¤´æä»¶ <stdexcept>
- æ ååºå¤´æä»¶ <csignal>
- æ ååºå¤´æä»¶ <csetjmp>
- æ ååºå¤´æä»¶ <stack>
- æ ååºå¤´æä»¶ <cassert>
- æ ååºå¤´æä»¶ <cerrno>
- æ ååºå¤´æä»¶ <memory>
- æ ååºå¤´æä»¶ <typeindex>
- æ ååºå¤´æä»¶ <type_traits>
- æ ååºå¤´æä»¶ <chrono>
- æ ååºå¤´æä»¶ <initializer_list>
- æ ååºå¤´æä»¶ <tuple>
- æ ååºå¤´æä»¶ <scoped_allocator>
- æ ååºå¤´æä»¶ <cstdint>
- æ ååºå¤´æä»¶ <cinttypes>
- æ ååºå¤´æä»¶ <system_error>
- æ ååºå¤´æä»¶ <cuchar>
- æ ååºå¤´æä»¶ <array>
- æ ååºå¤´æä»¶ <forward_list>
- æ ååºå¤´æä»¶ <unordered_set>
- æ ååºå¤´æä»¶ <unordered_map>
- æ ååºå¤´æä»¶ <random>
- æ ååºå¤´æä»¶ <ratio>
- æ ååºå¤´æä»¶ <cfenv>
- æ ååºå¤´æä»¶ <regex>
- æ ååºå¤´æä»¶ <atomic>
- æ ååºå¤´æä»¶ <thread>
- æ ååºå¤´æä»¶ <mutex>
- æ ååºå¤´æä»¶ <future>
- æ ååºå¤´æä»¶ <condition_variable>
- æ ååºå¤´æä»¶ <any>
- æ ååºå¤´æä»¶ <optional>
- æ ååºå¤´æä»¶ <variant>
- æ ååºå¤´æä»¶ <memory_resource>
- æ ååºå¤´æä»¶ <string_view>
- æ ååºå¤´æä»¶ <charconv>
- æ ååºå¤´æä»¶ <execution>
- æ ååºå¤´æä»¶ <filesystem>
- æ ååºå¤´æä»¶ <concepts>
- æ ååºå¤´æä»¶ <coroutine>
- æ ååºå¤´æä»¶ <compare>
- æ ååºå¤´æä»¶ <version>
- æ ååºå¤´æä»¶ <source_location>
- æ ååºå¤´æä»¶ <format>
- æ ååºå¤´æä»¶ <span>
- æ ååºå¤´æä»¶ <ranges>
- æ ååºå¤´æä»¶ <bit>
- æ ååºå¤´æä»¶ <numbers>
- æ ååºå¤´æä»¶ <syncstream>
- æ ååºå¤´æä»¶ <stop_token>
- æ ååºå¤´æä»¶ <semaphore>
- æ ååºå¤´æä»¶ <latch>
- æ ååºå¤´æä»¶ <barrier>
- æ ååºå¤´æä»¶ <string>
- æ ååºå¤´æä»¶ <cstddef>
- æ ååºå¤´æä»¶ <limits>
- æ ååºå¤´æä»¶ <cfloat>
- æ ååºå¤´æä»¶ <climits>
- æ ååºå¤´æä»¶ <cstdlib>
- æ ååºå¤´æä»¶ <new>
- æ ååºå¤´æä»¶ <typeinfo>
- æ ååºå¤´æä»¶ <exception>
- æ ååºå¤´æä»¶ <cstdarg>
- æ ååºå¤´æä»¶ <ciso646>
- æ ååºå¤´æä»¶ <cstdalign>
- æ ååºå¤´æä»¶ <cstdbool>
- æ ååºå¤´æä»¶ <fstream>
- æ ååºå¤´æä»¶ <cstdio>
- æ ååºå¤´æä»¶ <strstream>
- æ ååºå¤´æä»¶ <shared_mutex>
- æ ååºå¤´æä»¶ <ccomplex>
- æ ååºå¤´æä»¶ <ctgmath>
- 注é
- å ·åè¦æ±
- åè½ç¹æ§æµè¯ (C++20)
- å·¥å ·åº
- ç±»åæ¯æï¼åºæ¬ç±»åãRTTIãç±»åç¹æ§ï¼
- æ¦å¿µåº (C++20)
- é误å¤ç
- 卿å å管ç
- æ¥æåæ¶é´å·¥å ·
- å符串åº
- 容å¨åº
- è¿ä»£å¨åº
- èå´åº (C++20)
- ç®æ³åº
- æ°å¼åº
- è¾å ¥/è¾åºåº
- æä»¶ç³»ç»åº
- æ¬å°ååº
- æ£å表达å¼åº
- ååæä½åº
- çº¿ç¨æ¯æåº
- å®éªæ§ C++ ç¹æ§
- æç¨çèµæº
- ç´¢å¼
- std 符å·ç´¢å¼
- åç¨æ¯æ (C++20)
- C++ å ³é®è¯
ä½ç½®ï¼é¦é¡µ > C++ åèæå >C++ æ ååºå¤´æä»¶ > æ ååºå¤´æä»¶ <limits>
æ ååºå¤´æä»¶ <limits>
æ¤å¤´æä»¶æ¯ç±»åæ¯æåºçä¸é¨åã
声æ
| æä¾æ¥è¯¢ææåºç¡æ°å¼ç±»åçæ§è´¨çæ¥å£ã (类模æ¿) | |
| æç¤ºæµ®ç¹èå
¥æ¨¡å¼ (æä¸¾) | |
| æç¤ºæµ®ç¹éè§æ ¼åæ¨¡å¼ (æä¸¾) |
æ¦è¦
namespace std { template<class T> class numeric_limits; Â enum float_round_style { round_indeterminate = -1, round_toward_zero = 0, round_to_nearest = 1, round_toward_infinity = 2, round_toward_neg_infinity = 3, }; Â enum float_denorm_style { denorm_indeterminate = -1, denorm_absent = 0, denorm_present = 1 }; Â Â template<> class numeric_limits<bool>; Â template<> class numeric_limits<char>; template<> class numeric_limits<signed char>; template<> class numeric_limits<unsigned char>; template<> class numeric_limits<char8_t>; template<> class numeric_limits<char16_t>; template<> class numeric_limits<char32_t>; template<> class numeric_limits<wchar_t>; Â template<> class numeric_limits<short>; template<> class numeric_limits<int>; template<> class numeric_limits<long>; template<> class numeric_limits<long long>; template<> class numeric_limits<unsigned short>; template<> class numeric_limits<unsigned int>; template<> class numeric_limits<unsigned long>; template<> class numeric_limits<unsigned long long>; Â template<> class numeric_limits<float>; template<> class numeric_limits<double>; template<> class numeric_limits<long double>; }
ç±»æ¨¡æ¿ std::numeric_limits
template<class T> class numeric_limits { public: static constexpr bool is_specialized = false; Â static constexpr T min() noexcept { return T(); } static constexpr T max() noexcept { return T(); } static constexpr T lowest() noexcept { return T(); } Â static constexpr int digits = 0; static constexpr int digits10 = 0; static constexpr int max_digits10 = 0; Â static constexpr bool is_signed = false; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 0; static constexpr T epsilon() noexcept { return T(); } static constexpr T round_error() noexcept { return T(); } Â static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; Â static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr T infinity() noexcept { return T(); } static constexpr T quiet_NaN() noexcept { return T(); } static constexpr T signaling_NaN() noexcept { return T(); } static constexpr T denorm_min() noexcept { return T(); } Â static constexpr bool is_iec559 = false; static constexpr bool is_bounded = false; static constexpr bool is_modulo = false; Â static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; Â };
std::numeric_limits<bool> ç¹å
template<> class numeric_limits<bool> { public: static constexpr bool is_specialized = true; Â static constexpr bool min() noexcept { return false; } static constexpr bool max() noexcept { return true; } static constexpr bool lowest() noexcept { return false; } Â static constexpr int digits = 1; static constexpr int digits10 = 0; static constexpr int max_digits10 = 0; Â static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr bool epsilon() noexcept { return 0; } static constexpr bool round_error() noexcept { return 0; } Â static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; Â static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr bool infinity() noexcept { return 0; } static constexpr bool quiet_NaN() noexcept { return 0; } static constexpr bool signaling_NaN() noexcept { return 0; } static constexpr bool denorm_min() noexcept { return 0; } Â static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; Â static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; Â };