From b4690dda66c89830fde9436ed52f1ffd781d8fe4 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 25 Jan 2002 12:21:54 +0000 Subject: [PATCH] Use the information provided by the numeric_limits class if available. git-svn-id: https://svn.dealii.org/trunk@5406 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/source/parameter_handler.cc | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/deal.II/base/source/parameter_handler.cc b/deal.II/base/source/parameter_handler.cc index bd54a910e4..aa60ca9074 100644 --- a/deal.II/base/source/parameter_handler.cc +++ b/deal.II/base/source/parameter_handler.cc @@ -54,6 +54,9 @@ namespace Patterns + const int Integer::min_int_value; + const int Integer::max_int_value; + Integer::Integer (const int lower_bound, const int upper_bound) : @@ -124,8 +127,22 @@ namespace Patterns - Double::Double (const int lower_bound, - const int upper_bound) : + const double Double::min_double_value = +#ifdef HAVE_STD_NUMERIC_LIMITS + std::numeric_limits::min(); +#else + 1; +#endif + + const double Double::max_double_value = +#ifdef HAVE_STD_NUMERIC_LIMITS + std::numeric_limits::max(); +#else + 0; +#endif + + Double::Double (const double lower_bound, + const double upper_bound) : lower_bound (lower_bound), upper_bound (upper_bound) {}; -- 2.39.5