When hash_map is used in C ++, the warning is as follows:
[Html]
.............
/Usr/lib/gcc/x86_64-redhat-linux/4.4.7 /.. /.. /.. /.. /include/c ++/4.4.7/backward/backward_warning.h: 28: 2: Warning: # warning This file has des 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.
..............
.............
/Usr/lib/gcc/x86_64-redhat-linux/4.4.7 /.. /.. /.. /.. /include/c ++/4.4.7/backward/backward_warning.h: 28: 2: Warning: # warning This file has des 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.
..............
If used, an error is reported.
Solution to errors and Warnings:
[Html]
Set (CMAKE_CXX_FLAGS "-std = c ++ 0x-Wno-deprecated ")
Set (CMAKE_CXX_FLAGS "-std = c ++ 0x-Wno-deprecated ")
Add the-std = c ++ 0x and-Wno-deprecated options in CXX_FLAGS.
C ++ 0x indicates the new C ++. -Wno-deprecated indicates that warnings such as no-deprecated are ignored.