1

std::vector<>::const_iterator を使用しようとすると、「アクセス違反」が発生してクラッシュします。std::vector コードが独自の内部First_およびLast_ポインターを使用するとクラッシュしているようです。おそらくこれは既知のバグです。誰かが正しい回避策を教えてくれることを願っています。クラッシュする関数が外部ライブラリから呼び出されることはおそらく関係がありますか?

const Thing const*  AClass::findThing (const std::string& label) const
{
    //ThingList_.begin() blows up at run time.  Compiles fine.
    for (std::vector<Thing*>::const_iterator it = ThingList_.begin(); it != ThingList_.end(); ++it) {
        //Irrelevant.
    }
    return 0;
}

単に呼び出すだけThingList_.size()でもクラッシュします。

問題があれば、これはsp6です。

4

3 に答える 3