std::unordered_map::emplace issue with private/deleted copy constructor
问题 The following code compiles fine with gcc 4.7.2 (mingw) #include <unordered_map> #include <tuple> struct test { test() =default; private: test(test const&) =delete; }; int main() { std::unordered_map<char, test> map; map.emplace( std::piecewise_construct, std::forward_as_tuple('a'), std::forward_as_tuple() ); } If I change the copy constructor in test from test(test const&) =delete; to test(test const&) =default; however, the template error vomit seems to complain about const test& not being