Skip to content

Commit

Permalink
attempt to fix c++14 compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Apr 1, 2016
1 parent 9d570b8 commit 2cfffe8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/config.hpp
Expand Up @@ -528,6 +528,12 @@ class config
//-1 for the terminating null character.
return get_attribute(key, N - 1);
}

template<int N>
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
Expand Down

0 comments on commit 2cfffe8

Please sign in to comment.