Fix compile error: Compiler refuses to deduce alias template arguments on Darwin (clang 14.0.3)

input_handler.cc:1476:16: error: alias template 'ConstArrayView' requires template arguments; argument deduction only allowed for class templates
        insert(ConstArrayView{content});
               ^
input_handler.cc:1522:16: error: alias template 'ConstArrayView' requires template arguments; argument deduction only allowed for class templates
        insert(ConstArrayView{str});
               ^
This commit is contained in:
Sidharth Kshatriya 2023-04-22 22:20:29 +05:30
parent 019fbc5439
commit 7efcb94a5e

View File

@ -1473,7 +1473,7 @@ public:
void paste(StringView content) override void paste(StringView content) override
{ {
insert(ConstArrayView{content}); insert(ConstArrayView<StringView>{content});
m_idle_timer.set_next_date(Clock::now() + get_idle_timeout(context())); m_idle_timer.set_next_date(Clock::now() + get_idle_timeout(context()));
} }
@ -1519,7 +1519,7 @@ private:
void insert(Codepoint key) void insert(Codepoint key)
{ {
String str{key}; String str{key};
insert(ConstArrayView{str}); insert(ConstArrayView<String>{str});
context().hooks().run_hook(Hook::InsertChar, str, context()); context().hooks().run_hook(Hook::InsertChar, str, context());
} }