I'm having these two simple codes :
void f(){
std::map<int,std::unique_ptr<int>> map_;
std::unique_ptr<int> p;
map_[42] = std::move(p);
}
does build
struct test_s{
int toto;
std::unique_ptr<int> tata;
};
void f(){
std::map<int,test_s> map_;
test_s p;
map_[42] = std::move(p);
}
does not build because copy is forbidden on visual ctp120 It does build on MAC with Clang 4.2
Anyone has an idea about what I should change to make this work ?