P
Paul Dubuc
Question: In the following template function signature
template <class MAP>
int matchAbbreviationMap(
const MAP & choices,
typename MAP::value_type::first_type & arg,
typename MAP::value_type::second_type & val)
{
...
MAP is a std::map or std::multi_map so MAP::value_type::first_type is a const
type. I want arg to have the same type but to be non-const. Is there some
way to do this generically without specifying a redundant type in the template
parameters?
Thanks,
template <class MAP>
int matchAbbreviationMap(
const MAP & choices,
typename MAP::value_type::first_type & arg,
typename MAP::value_type::second_type & val)
{
...
MAP is a std::map or std::multi_map so MAP::value_type::first_type is a const
type. I want arg to have the same type but to be non-const. Is there some
way to do this generically without specifying a redundant type in the template
parameters?
Thanks,