Hash_map is deprecated and will be REMOVED. Please use unordered_map.

Hash_map is a C++ non-standard STL. Because of the advancement of standardization, hash_map is a non-standard container, and it will be replaced by unordered_map in the future. Suggest that we use unorder_map instead of hash_map, the solution

(1) Replace <hash_map> with <unorder_map> or

(2) Add macro definition to ignore this error

#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS //Adding this macro definition means that no error is reported
 #ifndef _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
static_assert(false, " is deprecated and will be REMOVED. "
	"Please use . You can define "
	"_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS "
	"to acknowledge that you have received this warning.");
 #endif /* _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS */

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *