why do i need to use piecewise_construct in map::emplace for single arg constructors of noncopyable objects?
As far as I can tell, the issue isn’t caused by map::emplace, but by pair‘s constructors: #include <map> struct A { A(int) {} A(A&&) = delete; A(A const&) = delete; }; int main() { std::pair<int, A> x(1, 4); // error } This code example doesn’t compile, neither with coliru’s g++4.8.1 nor with clang++3.5, which are … Read more