Thanks! Copy constructors were omitted from AMTL by design, but there's a
PR for move constructors which would probably solve my issues. Unfortunately it has errors.
The issue I have with writing my own copy constructor is that its parameter is const, but ke::HashMap doesn't have a const iterator:
PHP Code:
HTTPResponse(const struct HTTPResponse &other)
{
for (HTTPHeaderMap::iterator iter = other.headers.iter(); !iter.empty(); iter.next()) // member function 'iter' not viable: 'this' argument has type 'const HTTPHeaderMap' (aka 'const StringHashMap<ke::AString>'), but function is not marked const
{
headers.replace(iter->key.chars(), ke::Move(iter->value));
}
}
__________________