#include #include "../../util/usage.hh" namespace lm { namespace { class SizeNotify { public: explicit SizeNotify(std::size_t &out) : behind_(out) {} void operator()(const std::string &from) { behind_ = util::ParseSize(from); } private: std::size_t &behind_; }; } boost::program_options::typed_value *SizeOption(std::size_t &to, const char *default_value) { return boost::program_options::value()->notifier(SizeNotify(to))->default_value(default_value); } } // namespace lm