All pastes #475138 Raw Edit

Anonymous

public cpp v1 · immutable
·published 2007-05-07 08:09 UTC
rendered paste body
#ifndef QT_NO_STLtemplate <class Key, class T>Q_OUTOFLINE_TEMPLATE QMap<Key, T>::QMap(const std::map<Key, T> &other){    d = QMapData::createData();    d->insertInOrder = true;    typename std::map<Key,T>::const_iterator it = other.end();    while (it != other.begin()) {        --it;        insert((*it).first, (*it).second);    }    d->insertInOrder = false;}template <class Key, class T>Q_OUTOFLINE_TEMPLATE  std::map<Key, T> QMap<Key, T>::toStdMap() const{    std::map<Key, T> map;    const_iterator it = end();    while (it != begin()) {        --it;        map.insert(std::pair<Key, T>(it.key(), it.value()));    }    return map;}#endif // QT_NO_STL