From: Wolfgang Bangerth Date: Fri, 25 Jan 2002 12:21:54 +0000 (+0000) Subject: Use the information provided by the numeric_limits class if available. X-Git-Tag: v8.0.0~18429 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4690dda66c89830fde9436ed52f1ffd781d8fe4;p=dealii.git 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 --- 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) {};