ROCm / MIOpen

AMD's Machine Intelligence Library
https://rocm.docs.amd.com/projects/MIOpen/en/latest/
Other
1.07k stars 225 forks source link

[C++17] std::iterator and std::result_of are deprecated and need updates #1954

Open junliume opened 1 year ago

junliume commented 1 year ago

https://github.com/ROCmSoftwarePlatform/MIOpen/blob/ceb94dca9940a1534383fc0b846c44375f7dfc3a/src/include/miopen/db_record.hpp#L73

This line will have issue:


MIOpen/src/include/miopen/db_record.hpp:73:34: warning: 'iterator<std::input_iterator_tag, std::pair<std::basic_string<char>, miopen::FindDbData>>' is deprecated [-Wdeprecated-declarations]
    class Iterator : public std::iterator<std::input_iterator_tag, std::pair<std::string, TValue>>
                                 ^
/home/junliu/MIOpen/src/include/miopen/find_db.hpp:136:59: note: in instantiation of template class 'miopen::DbRecord::Iterator<miopen::FindDbData>' requested here
    auto begin() const { return content->As<FindDbData>().begin(); }
                                                          ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_iterator_base_types.h:127:12: note: 'iterator<std::input_iterator_tag, std::pair<std::basic_string<char>, miopen::FindDbData>>' has been explicitly marked deprecated here
    struct _GLIBCXX17_DEPRECATED iterator
           ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/c++config.h:119:34: note: expanded from macro '_GLIBCXX17_DEPRECATED'
# define _GLIBCXX17_DEPRECATED [[__deprecated__]]
                                 ^
1 warning generated when compiling for gfx90a.
ppanchad-amd commented 6 months ago

@junliume Is this ticket still relevant? Thanks!