#include <iostream>
#include <map>
#include <memory>
#include <vector>
using namespace std;

struct object {
};

enum type {
	TYPE0,
	TYPE1
};

typedef std::map<type, std::vector<std::unique_ptr<object> > > long_type;
static long_type m_objects;

int main() {
	
	std::vector<std::unique_ptr<object>> vec;
	vec.push_back(std::move(std::unique_ptr<object>(new object))); // make_unique in C++14
	
	m_objects.insert(std::pair<type, std::vector<std::unique_ptr<object>>>(TYPE0, std::move(vec)));
	
	long_type::iterator it = m_objects.find(TYPE0);
	
	m_objects.erase(it);
	
	cout << m_objects.size(); // 0
	
	return 0;
}