Преглед на файлове

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

Sam Jaffe преди 4 години
родител
ревизия
5eac206e3d
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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 = "");