diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-01 10:02:30 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-01 10:02:30 -0500 |
commit | 43414738a029a0b98f1937ba31501cf492d58003 (patch) | |
tree | 599f0381d096997d9ef75c62527d986e4b35bc0f /src/libutil/config.hh | |
parent | b6c98752f6a7c1824945b3aee9d94e0af16046f8 (diff) | |
parent | 518da6c6a30881bd0e767a84c8193a198eeed230 (diff) |
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'src/libutil/config.hh')
-rw-r--r-- | src/libutil/config.hh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libutil/config.hh b/src/libutil/config.hh index 79ec0f9cf..7ac43c854 100644 --- a/src/libutil/config.hh +++ b/src/libutil/config.hh @@ -250,11 +250,15 @@ public: operator const T &() const { return value; } operator T &() { return value; } const T & get() const { return value; } - bool operator ==(const T & v2) const { return value == v2; } - bool operator !=(const T & v2) const { return value != v2; } - void operator =(const T & v) { assign(v); } + template<typename U> + bool operator ==(const U & v2) const { return value == v2; } + template<typename U> + bool operator !=(const U & v2) const { return value != v2; } + template<typename U> + void operator =(const U & v) { assign(v); } virtual void assign(const T & v) { value = v; } - void setDefault(const T & v) { if (!overridden) value = v; } + template<typename U> + void setDefault(const U & v) { if (!overridden) value = v; } void set(const std::string & str, bool append = false) override; |