13 #ifndef MLPACK_BINDINGS_CLI_ADD_TO_PO_HPP
14 #define MLPACK_BINDINGS_CLI_ADD_TO_PO_HPP
17 #include <boost/program_options.hpp>
35 boost::program_options::options_description& desc,
37 const typename boost::disable_if<std::is_same<T, bool>>::type* = 0)
39 desc.add_options()(boostName.c_str(), boost::program_options::value<T>(),
54 boost::program_options::options_description& desc,
56 const typename boost::disable_if<std::is_same<T, bool>>::type* = 0)
58 desc.add_options()(boostName.c_str(),
59 boost::program_options::value<T>()->multitoken(), descr.c_str());
72 boost::program_options::options_description& desc,
74 const typename boost::enable_if<std::is_same<T, bool>>::type* = 0)
76 desc.add_options()(boostName.c_str(), descr.c_str());
93 boost::program_options::options_description* desc =
94 (boost::program_options::options_description*) output;
98 MapParameterName<typename std::remove_pointer<T>::type>(d.
name);
104 AddToPO<typename ParameterType<typename std::remove_pointer<T>::type>::type>(
105 boostName, d.
desc, *desc);
void AddToPO(const std::string &boostName, const std::string &descr, boost::program_options::options_description &desc, const typename boost::disable_if< util::IsStdVector< T >>::type *=0, const typename boost::disable_if< std::is_same< T, bool >>::type *=0)
Add a non-vector option to boost::program_options.
std::string desc
Description of this parameter, if any.
This structure holds all of the information about a single parameter, including its value (which is s...
Metaprogramming structure for vector detection.
char alias
Alias for this parameter.
std::string name
Name of this parameter.
string(REGEX REPLACE".*#define MLPACK_VERSION_MINOR ([0-9]+).*""\\1"MLPACK_VERSION_MINOR"${VERSION_HPP_CONTENTS}") string(REGEX REPLACE".* "\\1" MLPACK_VERSION_PATCH "$