Browse Source

Make it impossible to manually construct an argument/option or to call the functions external to subclasses.

Sam Jaffe 4 năm trước cách đây
mục cha
commit
5eac206e3d
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      include/program_args/arguments.h

+ 2 - 1
include/program_args/arguments.h

@@ -7,7 +7,7 @@
 namespace program {
 
 template <typename Impl> class Arguments {
-protected:
+private:
   struct Argument;
   struct Option;
   template <typename, typename> struct WithDefault;
@@ -16,6 +16,7 @@ public:
   Arguments() = default;
   Arguments(int argc, char const * const * const argv);
 
+protected:
   auto option(std::string const & name, std::string const & description = "");
   auto option(std::string const & name, char abbrev,
               std::string const & description = "");