It is possible to replace the two constructors in this program with a single template constructor with perfect forwarding?
#include <unordered_map>
#include <unordered_set>
#include <string>
using Mymap = std::unordered_map<std::string, std::unordered_set<std::string>>;
class A {
Mymap n_;
public:
A(Mymap&& n)
: n_{std::move(n)}
{}
A(Mymap& n)
: n_{n}
{}
// doesn't compile
//template <typename T>
//A(T<Mymap::value_type>&& n)
// : n_{std::forward(n)}
//{}
};
int main() {
A a1{{{"C", {"A", "B"}}}};
Mymap m{{{"C", {"A", "B"}}}};
A a2{m};
}