try
{
LexicalConverter conv((Fmt()));
- conv<<k;
+ conv << k;
return conv.get();
}
catch(const lexical_error &)
template<typename T>
typename T::mapped_type &get_item(T &map, const typename T::key_type &key)
{
- typename T::iterator i = map.find(key);
+ auto i = map.find(key);
if(i==map.end())
throw key_error(key);
template<typename T>
const typename T::mapped_type &get_item(const T &map, const typename T::key_type &key)
{
- typename T::const_iterator i = map.find(key);
+ auto i = map.find(key);
if(i==map.end())
throw key_error(key);
if(map.count(key))
throw key_error(key);
- return map.insert(typename T::value_type(key, item)).first;
+ return map.insert(std::make_pair(key, item)).first;
}
template<typename T>