diff --git a/src/config.hpp b/src/config.hpp index 1707e7a0271f..4192306dae25 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -528,6 +528,12 @@ class config //-1 for the terminating null character. return get_attribute(key, N - 1); } + + template + inline attribute_value& operator[](const char (&key)[N]) + { + return (*this)[std::string(key)]; + } #endif /** * Returns a pointer to the attribute with the given @a key