diff options
author | Nathan Woods <npwoods@mess.org> | 2016-09-10 15:16:45 -0400 |
---|---|---|
committer | Nathan Woods <npwoods@mess.org> | 2016-09-10 15:16:45 -0400 |
commit | cc709106938eb57108196ad36945b0a28c6f84ac (patch) | |
tree | b78bcad3652c5bd48cc355179d57af91b04bce01 /src/lib | |
parent | a4a5dbc5dddbbfc8cb08c5705c48bd909dbf1ede (diff) |
Subscripting std::array<..., 0> is bad; working around this specific case
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/util/opresolv.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/util/opresolv.h b/src/lib/util/opresolv.h index 3d919d26d59..f6a98bf444a 100644 --- a/src/lib/util/opresolv.h +++ b/src/lib/util/opresolv.h @@ -142,7 +142,7 @@ public: template<typename... T> option_guide_impl(T &&... elems) : std::array<option_guide::entry, Count>({ std::forward<T>(elems)... }) - , option_guide(&(*this)[0], &(*this)[0] + Count) + , option_guide(Count > 0 ? &(*this)[0] : nullptr, Count > 0 ? &(*this)[0] + Count : nullptr) { } }; |