diff --git a/src/highlighters.cc b/src/highlighters.cc index 80797afa..12179f25 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -509,8 +509,8 @@ std::unique_ptr create_dynamic_regex_highlighter(HighlighterParamet } auto make_hl = [](auto& regex_getter, auto& face_getter) { - return std::make_unique, - std::decay_t>>( + return std::make_unique, + std::remove_cvref_t>>( std::move(regex_getter), std::move(face_getter)); }; auto get_face = [faces=std::move(faces)](const Context& context, const Regex& regex){ diff --git a/src/option_types.cc b/src/option_types.cc index 5cd4371c..a1eeb418 100644 --- a/src/option_types.cc +++ b/src/option_types.cc @@ -9,7 +9,7 @@ UnitTest test_option_parsing{[]{ { auto repr = option_to_strings(value); kak_assert(strs == ConstArrayView{repr}); - auto parsed = option_from_strings(Meta::Type>{}, strs); + auto parsed = option_from_strings(Meta::Type>{}, strs); kak_assert(parsed == value); }; diff --git a/src/ranges.hh b/src/ranges.hh index 8666510c..5fb1e2c9 100644 --- a/src/ranges.hh +++ b/src/ranges.hh @@ -15,7 +15,7 @@ namespace Kakoune template struct ViewFactory { Func func; }; template -ViewFactory> +ViewFactory> make_view_factory(Func&& func) { return {std::forward(func)}; } template @@ -25,7 +25,7 @@ decltype(auto) operator| (Range&& range, ViewFactory factory) } template -struct decay_range_impl { using type = std::decay_t; }; +struct decay_range_impl { using type = std::remove_cvref_t; }; template struct decay_range_impl { using type = Range&; }; @@ -261,11 +261,11 @@ inline auto transform(Transform t) }); } -template +template struct is_pointer_like : std::false_type {}; -template -struct is_pointer_like())>, std::decay_t>>> : std::true_type {}; +template requires std::is_same_v())>, std::remove_cvref_t> +struct is_pointer_like : std::true_type {}; template inline auto transform(M T::*member) @@ -547,7 +547,7 @@ auto elements() return *it; }; // Note that initializer lists elements are guaranteed to be sequenced - Array, sizeof...(Indexes)> res{{elem(Indexes)...}}; + Array, sizeof...(Indexes)> res{{elem(Indexes)...}}; if (exact_size and ++it != end_it) throw ExceptionType{++i}; return res; diff --git a/src/utils.hh b/src/utils.hh index 8dffa9ac..818cf957 100644 --- a/src/utils.hh +++ b/src/utils.hh @@ -205,7 +205,7 @@ struct Overload : Funcs... template auto overload(Funcs&&... funcs) { - return Overload...>{std::forward(funcs)...}; + return Overload...>{std::forward(funcs)...}; } } diff --git a/src/value.hh b/src/value.hh index aa53afb8..982cb912 100644 --- a/src/value.hh +++ b/src/value.hh @@ -18,7 +18,7 @@ struct Value template requires (not std::is_same_v) Value(T&& val) - : m_value{new Model>{std::forward(val)}} {} + : m_value{new Model>{std::forward(val)}} {} Value(const Value& val) = delete; Value(Value&&) = default;