Fix compilation on OS-X.

OS X complains about std::pair not having a constexpr constructor. Which
seems to be the case for C++11. Hence, let's make it static const for
the moment.

This commit should be reverted when we move to C++17.
This commit is contained in:
Johanna Amann 2019-10-07 18:52:11 -07:00
parent e615d1f4a8
commit cde28074a1

View file

@ -666,7 +666,7 @@ void IntervalVal::ValDescribe(ODesc* d) const
{ {
using unit_word = std::pair<double, const char*>; using unit_word = std::pair<double, const char*>;
constexpr std::array<unit_word, 6> units = { static const std::array<unit_word, 6> units = {
unit_word{ Days, "day" }, unit_word{ Days, "day" },
unit_word{ Hours, "hr" }, unit_word{ Hours, "hr" },
unit_word{ Minutes, "min" }, unit_word{ Minutes, "min" },