I mean not keep pointer on array
std::vector<int*> vector;
but
std::vector<int[]> vector;
The problem is to keep such array in hash_map in order to compare not pointers when Insert there but when I try like this
std::hash_map<std::vector<BYTE>,std::string> xxx
I've got an error.
vector<int[]>is exactly the same thing as avector<int*>. Did you maybe mean avector<int[N]>(where N is a compile-time constant)?unordered_map, and this works fine for me:std::unordered_map<std::vector<unsigned char>, std::string>std::unordered_map<std::array<unsigned char, N>, std::string>is a possibility too, since the array is presumably statically-sized.vector<int[3]> v; v.push_back({1, 2, 3});This even makes GCC segfault :)cannot convert from 'const std::vector<_Ty>' to 'size_t'