src/LearnIt/ProgramOptionsUtils.cpp
// Validates a command-line argument that must be defined no more than once.

Validates a command-line argument that must be defined no more than once.
Validates a command - line argument that must be defined no more than once .
void validate_unique_cmd_line_arg(const boost::program_options::options_description & desc,
								  const boost::program_options::variables_map & var_map, const std::string & param_name) {
	if (var_map.count(param_name) > 1) {
		std::cerr << "Command-line argument '" << param_name << "' can only be specified at most once." << std::endl; 
		write_help_msg(desc);
	}
}
void validate_unique_cmd_line_arg ( const boost :: program_options :: options_description & desc , const boost :: program_options :: variables_map & var_map , const std :: string & param_name ) { if ( var_map . count ( param_name ) > 1 ) { std :: cerr << " " << param_name << " " << std :: endl ; write_help_msg ( desc ) ; } }
Validates a command-line argument that must be defined no more than once.
Validates a command - line argument that must be defined no more than once .