The at() function for std::map was added for libstdc++ release 4.1, and
it is not part of the official STL.
Also some developers are still using libstdc++ 4.0, so using at() will
not compile.
Instead, use an iterator for std::map element access, which is the
standard (albeit annoying) practice.
size_t
Open_type_font::index_to_charcode (size_t i) const
{
- return index_to_charcode_map_.at (i);
+ map<FT_UInt, FT_ULong>::const_iterator iter;
+ iter = index_to_charcode_map_.find (i);
+
+ if (iter != index_to_charcode_map_.end ())
+ return (size_t) iter->second;
+ else
+ {
+ programming_error (_ ("Invalid index for character"));
+ return 0;
+ }
}
size_t