diff --git a/dune/solvers/common/interval.hh b/dune/solvers/common/interval.hh index 69524020ff0cdf9f43fc1b84016e84f13752aa17..f46d1599b880feb23392ef021d19ba30c9a29f7d 100644 --- a/dune/solvers/common/interval.hh +++ b/dune/solvers/common/interval.hh @@ -61,6 +61,9 @@ public: */ field_type projectIn(const field_type& x) const { + // NB: C++17 has std::clamp(x, data_[0], data_[1]). + // Note, however, that we need to guarantee neither + // data_[0] nor data_[1] is NaN then. return std::max(std::min(x,data_[1]), data_[0]); }