nlohmann / fifo_map

a FIFO-ordered associative container for C++
MIT License
179 stars 77 forks source link

swap function is error #7

Open 7c0o opened 5 years ago

7c0o commented 5 years ago
/// swaps the contents
void swap(fifo_map& other)
{
    std::swap(m_map, other.m_map);
    std::swap(m_compare, other.m_compare);
    std::swap(m_keys, other.m_keys);
}

m_compare‘s member m_key point to m_map's m_key

danielharvey458 commented 4 years ago

The use the of the compiler-provided copy-assignment operator is also incorrect.