#pragma once #include namespace WallpaperEngine::Core::UserSettings { class CUserSettingValue { public: template const T* as () const { assert (is ()); return (const T*) this; } template T* as () { assert (is ()); return (T*) this; } template bool is () { return this->m_type == T::Type; } protected: explicit CUserSettingValue (std::string type); private: std::string m_type; }; }