rendered paste bodytypedef std::deque<int> TPosMapValue;
typedef std::map<int, int> TSparseVector;
typedef std::map<int, Link> TLinkMap;
// see _withPositionsOfInInterval
template<typename TItem, typename TSequence>
std::map<TItem, TPosMapValue> get_eq_pos(const TSequence &s,
int start,
int end)
{
typedef std::map<TItem, TPosMapValue> TPosMap;
TPosMap d;
for (int index = start; index <= end; ++index) {
TItem key = s[index];
typename TPosMap::iterator iter = d.find(key);
if (iter == d.end()) {
TPosMapValue value;
value.push_front(index);
d.insert(TPosMap::value_type(key, value));
} else {
iter->second.push_front(index);
}
}
return d;
}
lcsimpl.hh:41: error: dependent-name 'std::TPosMap::value_type' is parsed as a non-type, but instantiation yields a type
lcsimpl.hh:41: note: say 'typename std::TPosMap::value_type' if a type is meant