I'm trying to create a class with unordered_set of paths as data member. At first, I declared a class with this member and got error:
Attempting to reference a deleted function
After reading a few posts here as well as reading C++17 path class info, I understood I lacked specifying a hash function. So I tried this:
class A
{
public:
A() = default;
A(const A& fc) = default;
A& operator=(const A& fc) = default;
private:
std::unordered_set<fs::path, std::hash<fs::path>> m_files;
};
but still got the error above despite specifying the built-in hash function. (std::path also have operator= function)
Tried to instantiate an instance of this class, but got the error described. Seem related to the unordered set hash function.
Visual Studio 2019 (v142) 16.11.3 C++ Language standard: ISO C++20 standard (:/std:c++20) C Language standard: Default (Legacy MSVC)
What am I missing here?