我試圖用的hash_map,在Android NDK定義,但我得到一個 「棄用警告」:如何在Android中使用unordered_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 /包括/和也在gnu-libstdC++/4.6/include/tr1 /中,我相信有一種方法可以使用它。
問題是我找不到它。以下哪一項是正確的(如果有的話):
#include <tr1/unordered_map.h>
#include <unordered_map>
然後,如何使用它? __gnu_cxx :: unordered_map無法識別...我不知道如何找到這些信息。