diff --git a/src/commands.cc b/src/commands.cc index d06f75b8..2523d0c0 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -832,7 +832,7 @@ const CommandDesc declare_option_cmd = { else if (parser[0] == "str") opt = &opts.declare_option(parser[1], docstring, "", flags); else if (parser[0] == "regex") - opt = &opts.declare_option(parser[1], docstring, {}, flags); + opt = &opts.declare_option(parser[1], docstring, Regex{}, flags); else if (parser[0] == "int-list") opt = &opts.declare_option>(parser[1], docstring, {}, flags); else if (parser[0] == "str-list") diff --git a/src/string.hh b/src/string.hh index 954436e4..eb241e76 100644 --- a/src/string.hh +++ b/src/string.hh @@ -65,7 +65,7 @@ public: constexpr StringView() : m_data{nullptr}, m_length{0} {} constexpr StringView(const char* data, ByteCount length) : m_data{data}, m_length{length} {} - constexpr StringView(const char* data) : m_data{data}, m_length{(int)strlen(data)} {} + StringView(const char* data) : m_data{data}, m_length{(int)strlen(data)} {} constexpr StringView(const char* begin, const char* end) : m_data{begin}, m_length{(int)(end - begin)} {} StringView(const String& str) : m_data{str.data()}, m_length{str.length()} {}