Category : abstract-base-class

I want to write a Settings class to load and store settings of various types: template <typename T> class Setting { std::string m_name; T m_defaultValue; T load() { if(backend.contains(m_name)) return backend.load<T>(m_name); return m_defaultValue; } void save(const T &value) {, value); } } The backend has implementaions for some basic types, but not for my ..

Read more