Commit 8d95e859 authored by Dominik Charousset's avatar Dominik Charousset

Support automagic integer <-> timespan options

parent 61d13970
......@@ -22,7 +22,6 @@
#include "caf/config_option.hpp"
#include "caf/fwd.hpp"
#include "caf/make_config_option.hpp"
namespace caf {
......@@ -49,7 +48,12 @@ public:
/// For backward compatibility only. Do not use for new code!
/// @private
config_option_adder& add_neg(bool& storage, const char* name,
config_option_adder& add_neg(bool& ref, const char* name,
const char* description);
/// For backward compatibility only. Do not use for new code!
/// @private
config_option_adder& add_us(size_t& ref, const char* name,
const char* description);
private:
......
......@@ -35,6 +35,13 @@ config_option_adder& config_option_adder::add_neg(bool& ref, const char* name,
name, description));
}
config_option_adder& config_option_adder::add_us(size_t& ref,
const char* name,
const char* description) {
return add_impl(make_us_resolution_config_option(ref, category_,
name, description));
}
config_option_adder& config_option_adder::add_impl(config_option&& opt) {
xs_.add(std::move(opt));
return *this;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment