8 #include <boost/format.hpp> 9 #include <boost/lexical_cast.hpp> 37 throw std::runtime_error(
38 "Bad bounds! " + boost::lexical_cast<std::string>(value) +
" is not within: " +
bounds());
56 if (
min >= value ||
max <= value)
66 boost::format(
"(%s,%s)") % boost::lexical_cast<std::string>(
min) % boost::lexical_cast<std::string>(
max));
bounded(const T &value, const T &min, const T &max)
Definition: parameters.hpp:14
T max
Definition: parameters.hpp:32
Definition: parameters.hpp:11
bounded & operator=(const T &value)
Definition: parameters.hpp:44
std::string bounds() const
Definition: parameters.hpp:63
Definition: parameters.hpp:13
bool has_bounds
Definition: parameters.hpp:33
T min
Definition: parameters.hpp:32
bool check(const T &value) const
Definition: parameters.hpp:52
T value
Definition: parameters.hpp:32
void set(const T &value)
Definition: parameters.hpp:34