C++: Boost interprocess memory mapped file error -
i'm trying create memory mapped file using this answer, i'm getting compile errors. code: namespace bi = boost::interprocess; std::string vecfile = "vector.dat"; bi::managed_mapped_file file_vec(bi::open_or_create,vecfile.c_str(), sizeof(struct rectangle) * data_size); typedef bi::allocator<struct rectangle, bi::managed_mapped_file::segment_manager> rect_alloc; typedef std::vector<struct rectangle, rect_alloc> myvec; myvec * vecptr = file_vec.find_or_construct<myvec>("myvector")(file_vec.get_segment_manager()); vecptr->push_back(random_rectangle); the struct this: struct rectangle{ rectangle(float *minarr, float *maxarr, int arr, int exp, int id){ this->arrival = arr; this->expiry = exp; this->id = id; for(int i=0; < 2; i++){ min[i] = minarr[i]; max[i] = maxarr[i]; } int arrival, expiry, id; float min[2]; float max[2]; } the error is: compiler not deduce template argu...