cmdopt: add count constructor
This commit is contained in:
parent
544d4d9624
commit
79a936b583
@ -85,10 +85,17 @@ namespace util { namespace cmdopt { namespace option {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
count<T>::count (std::string _name, T &_data):
|
||||
value<T> (std::move (_name), _data)
|
||||
{ ; }
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
void
|
||||
count<T>::execute (void)
|
||||
{
|
||||
++ this->data();
|
||||
++this->data ();
|
||||
}
|
||||
|
||||
|
||||
|
@ -62,7 +62,7 @@ namespace util { namespace cmdopt {
|
||||
template <typename T = unsigned>
|
||||
class count : public value<T> {
|
||||
public:
|
||||
count (std::string name);
|
||||
count (std::string name, T&);
|
||||
|
||||
using value<T>::execute;
|
||||
void execute (void) override;
|
||||
|
Loading…
Reference in New Issue
Block a user