, , std::tuple operator== . , . - :
#include <tuple>
class ApplicationSettings
{
public:
bool operator==(const ApplicationSettings& other) const;
bool operator!=(const ApplicationSettings& other) const;
private:
enum m {
ApplicationSkin,
IntervalForUpdateChecks,
bDockSelectionWidget
};
std::tuple<
SkinType,
UpdateCheckInterval,
bool
> m_Data;
};
:
bool ApplicationSettings::operator==(const ApplicationSettings& other) const {
m_Data == other.m_Data;
}
, , - std::get<m::ApplicationSkin>(m_Data). .