See also http://stackoverflow.com/questions/695372/c-standard-list-and-default-constructible-types
Not a major issue, just annoying as I don't want my class to ever be instantiated without the particular arguments.
class MyClass
{
public:
MyClass(MyType1 t);
MyType2 &operator[](int index);
}
map<int, MyClass> myMap;
This gives me the following g++ error:
/usr/include/c++/4.3/bits/stl_map.h:419: error: no matching function for call to ‘MyClass()’
This compiles fine if I add a default constructor; I am certain it's not caused by incorrect syntax.