diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e5dafba..362fa67f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ +## Version 0.8 (in progress) + +* Moved to CLTools on GitHub + ## Version 0.7 + * Allow comments in ini files (lines starting with `;`) * Ini files support flags, vectors, subcommands * Added CodeCov code coverage reports diff --git a/include/CLI/Option.hpp b/include/CLI/Option.hpp index 0658d553..d50657a3 100644 --- a/include/CLI/Option.hpp +++ b/include/CLI/Option.hpp @@ -155,12 +155,12 @@ public: /// Set the number of expected arguments (Flags bypass this) Option* expected(int value) { - if(!changeable_) - throw IncorrectConstruction("You can only change the expected arguments for vectors"); - else if(value == 0) + if(value == 0) throw IncorrectConstruction("Cannot set 0 expected, use a flag instead"); else if(expected_ == 0) throw IncorrectConstruction("Cannot make a flag take arguments!"); + else if(!changeable_) + throw IncorrectConstruction("You can only change the expected arguments for vectors"); expected_ = value; return this; }