Message: Because we do not use gcc 12, we have an error with unordered_map and std::pair. Author: zensubz Date-Modified: 2022-06-27 Version: 11.22 Source: https://freefilesync.org/forum/viewtopic.php?t=9376&p=34044#p34044 Distro: any distro with g++ < 12 --- a/FreeFileSync/Source/base/db_file.cpp +++ b/FreeFileSync/Source/base/db_file.cpp @@ -642,7 +642,7 @@ void process(const ContainerObject::FolderList& currentFolders, const Zstring& parentRelPath, InSyncFolder::FolderList& dbFolders) { - std::unordered_map toPreserve; + std::map toPreserve; for (const FolderPair& folder : currentFolders) if (!folder.isPairEmpty()) --- a/FreeFileSync/Source/base/db_file.h +++ b/FreeFileSync/Source/base/db_file.h @@ -67,9 +67,9 @@ InSyncStatus status = DIR_STATUS_STRAW_MAN; //------------------------------------------------------------------ - using FolderList = std::unordered_map; // - using FileList = std::unordered_map; // key: file name (ignoring Unicode normal forms) - using SymlinkList = std::unordered_map; // + using FolderList = std::map; // + using FileList = std::map; // key: file name (ignoring Unicode normal forms) + using SymlinkList = std::map; // //------------------------------------------------------------------ FolderList folders; --- a/FreeFileSync/Source/base/file_hierarchy.h +++ b/FreeFileSync/Source/base/file_hierarchy.h @@ -7,12 +7,14 @@ #ifndef FILE_HIERARCHY_H_257235289645296 #define FILE_HIERARCHY_H_257235289645296 +#include #include #include #include #include #include -#include +#include +#include #include "structures.h" #include "path_filter.h" #include "../afs/abstract.h" @@ -94,9 +96,9 @@ //------------------------------------------------------------------ //key: raw file name, without any (Unicode) normalization, preserving original upper-/lower-case //"Changing data [...] to NFC would cause interoperability problems. Always leave data as it is." - using FolderList = std::unordered_map>; - using FileList = std::unordered_map; - using SymlinkList = std::unordered_map; + using FolderList = std::map>; + using FileList = std::map; + using SymlinkList = std::map; //------------------------------------------------------------------ FolderContainer() = default;