I have a class A
struct A
{
A() = delete;
A(const A&) = default;
A& operator=(const A&) = default;
A(A&&) = default;
A& operator=(A&&) = default;
explicit A(int i) ....
// a few explicit constructors
}
when I am trying to get strcut A that is stored in unordered_map as below:
auto a = my_map[key_];
I get
illegal use of deleted method
error. my understanding was that this is a copy construction, but I do not know why compiler calls the default constructor before the assignement.