Bug 1774336 - Make FileInfoManagerGuard's default constructor public for C++20. r=saschanaz

C++20 changes to direct initialization with initializer lists make FileInfoManagerGuard's default constructor inaccessible.

https://en.cppreference.com/w/cpp/language/direct_initialization

dom/indexedDB/ActorsParent.cpp:12131:21: error: calling a private constructor of class 'mozilla::dom::indexedDB::FileInfoManager<mozilla::dom::indexedDB::DatabaseFileManager>::FileInfoManagerGuard'
                    FileInfoManagerGuard{}, SafeRefPtrFromThis(), id,
                    ^
dom/indexedDB/FileInfoManager.h:92:5: note: implicitly declared private here
    FileInfoManagerGuard() = default;
    ^

Differential Revision: https://phabricator.services.mozilla.com/D149349
This commit is contained in:
Chris Peterson
2022-07-05 06:01:45 +00:00
parent e1538f8276
commit 914a24512c

View File

@@ -86,7 +86,7 @@ class FileInfoManager : public FileInfoManagerBase {
return NS_OK; return NS_OK;
} }
class FileInfoManagerGuard { struct FileInfoManagerGuard {
FileInfoManagerGuard() = default; FileInfoManagerGuard() = default;
}; };