// util/limits1.cpp #include #include #include using namespace std; int main() { // Использование текстового представления для bool cout << boolalpha; // Вывод максимальных значений для целочисленных типов cout << "max(short): " << numeric_limits::max() << endl; cout << "max(int): " << numeric_limits::max() << endl; cout << "max(long): " << numeric_limits::max() << endl; cout << endl; // Вывод максимальных значений для вещественных типов cout << "max(float): " << numeric_limits::max() << endl; cout << "max(double): " << numeric_limits::max() << endl; cout << "max(long double): " << numeric_limits::max() << endl; cout << endl; // Проверяем, является ли тип char знаковым. cout << "is_signed(char): " << numeric_limits::is_signed << endl; cout << endl; // Проверка наличия числовых пределов у типа string cout << "is_specialized(string): " << numeric_limits::is_specialized << endl; }