我正在尝试使用在Android NDK中定义的hash_map,但是我收到了一个“过时警告”:
ndk/sources/cxx-stl/gnu-libstdc++/4.6/include/ext/../backward/backward_warning.h:33:2:
error: #warning This file includes at least one deprecated or antiquated header which may
be removed without further notice at a future date. Please use a non-deprecated interface
with equivalent functionality instead. For a listing of replacement headers and
interfaces, consult the file backward_warning.h. To disable this warning use -Wno-
deprecated. [-Werror=cpp]
由于 "unordered_map" 存在于 gnu-libstdc++/4.6/include/ 和 gnu-libstdc++/4.6/include/tr1/ 中,所以我相信可以使用它。
关键是我找不到它。以下哪一个是正确的(如果有):
#include <tr1/unordered_map.h>
#include <unordered_map>
那么,如何使用它呢?__gnu_cxx::unordered_map没有被识别... 我不知道如何查找这些信息。