K
Krivenok Dmitry
I use boost program_options library in my project.
But I have one trouble and can't solve it
I writing simple wrapper class and use generic selector:
///////////////////////////////////////////////////////////////////
// General options selector
template <class T>
void CmdLine::GetOption(const std::string& Name, T& var)
{
if (VariablesMap_.count(Name)) var = VariablesMap_[Name].as<T>();
}
////////////////////////////////////////////////////////////////////
But this method doesn't compile!!!
Errors are :
Compiling OBJ/Cmdline.oIn file included from
CmdLineParse/Cmdline.hpp:46,
from CmdLineParse/Cmdline.cpp:7:
CmdLineParse/Cmdline.tcc: In member function `void
CmdLine::GetOption(const
std::string&, T&)':
CmdLineParse/Cmdline.tcc:7: syntax error before `>' token
Where is my error?
But I have one trouble and can't solve it
I writing simple wrapper class and use generic selector:
///////////////////////////////////////////////////////////////////
// General options selector
template <class T>
void CmdLine::GetOption(const std::string& Name, T& var)
{
if (VariablesMap_.count(Name)) var = VariablesMap_[Name].as<T>();
}
////////////////////////////////////////////////////////////////////
But this method doesn't compile!!!
Errors are :
Compiling OBJ/Cmdline.oIn file included from
CmdLineParse/Cmdline.hpp:46,
from CmdLineParse/Cmdline.cpp:7:
CmdLineParse/Cmdline.tcc: In member function `void
CmdLine::GetOption(const
std::string&, T&)':
CmdLineParse/Cmdline.tcc:7: syntax error before `>' token
Where is my error?