Closed balintkissdev closed 5 years ago
First I thought about using const
for the defaultValue
and value
parameters like this
template <class T> T get(const std::string& section, const std::string& name, const T defaultValue = T());
template <class T> void set(const std::string& section, const std::string& name, const T value);
because it's my design philosophy that having const function parameters helps detecting bugs earlier while maintaining the function implementation. Not sure if you had other intentions by keeping those parameters as they are.
const T& defaultValue = T()
would be great for std::string
parameters, but utter waste for primitives like bool
and int
.
Thanks for the PR!
Fixes #388