[run] define some more constructors

This commit is contained in:
Joe Thornber 2013-05-28 12:59:17 +01:00
parent e64dda95f6
commit 8253930cdd

View File

@ -12,7 +12,19 @@ namespace base {
public: public:
typedef boost::optional<T> maybe; typedef boost::optional<T> maybe;
explicit run(maybe begin = maybe(), maybe end = maybe()) run() {
}
explicit run(T const &b)
: begin_(b) {
}
run(T const &b, T const &e)
: begin_(b),
end_(e) {
}
explicit run(maybe begin, maybe end)
: begin_(begin), : begin_(begin),
end_(end) { end_(end) {
} }