There is not possible to pass a NULL value_semantic argument
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 6 Oct 2011 10:46:49 +0000 (07:46 -0300)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 6 Oct 2011 10:51:22 +0000 (07:51 -0300)
- For options that do not require arguments (like help, daemon and version),
  it must be passed an untyped_value object

src/config/option/configurationoption.cpp

index c281313..99ad877 100644 (file)
@@ -23,6 +23,7 @@
 using namespace std;
 using boost::program_options::option_description;
 using boost::program_options::option_description;
+using boost::program_options::untyped_value;
 using boost::program_options::value_semantic;
 using boost::shared_ptr;
 
@@ -40,7 +41,7 @@ ConfigurationOption::ConfigurationOption(
         const char *command_string,
         const char *command_description
 ) :
-    option( command_string, NULL, command_description )
+    option( command_string, new untyped_value(true), command_description )
 {
 }