I get an compile error here and I have no idea whats wrong with the code. I am using g++ 4.9.2.
#include<iostream>
#include<deque>
using std::string;
using std::deque;
class Dummy {
public:
    virtual ~Dummy(){};
    Dummy():ID_("00") {};
private:
    const string ID_;
};
int main(){
    {
    deque <Dummy> waiter;
    waiter.push_back(Dummy());
    waiter.erase( waiter.begin() );
    }
    return 0;
}
Edit: I know that removing the const removes the compilation error, but I have no idea why. Anyway, I need this const.
 
     
     
    