【发布时间】:2013-03-10 19:55:51
【问题描述】:
我正在尝试使用在 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 无法识别...而且我不知道如何找到这些信息。
【问题讨论】:
标签: android c++ c++11 hashmap unordered-map