Small code simplifications

This commit is contained in:
Maxime Coste 2017-09-07 19:38:34 +08:00
parent bd66aff808
commit fdf7cf3944
2 changed files with 2 additions and 2 deletions

View File

@ -168,7 +168,7 @@ void find_diff_rec(Iterator a, int begA, int endA,
append_diff(diffs, {Diff::Keep, suffix_len, 0});
}
template<typename Iterator, typename Equal = std::equal_to<typename std::iterator_traits<Iterator>::value_type>>
template<typename Iterator, typename Equal = std::equal_to<>>
Vector<Diff> find_diff(Iterator a, int N, Iterator b, int M, Equal eq = Equal{})
{
const int max = 2 * (N + M) + 1;

View File

@ -19,7 +19,7 @@ struct Value
template<typename T,
typename = std::enable_if_t<not std::is_same<Value, T>::value>>
Value(T&& val)
: m_value{new Model<std::remove_reference_t<T>>{std::forward<T>(val)}} {}
: m_value{new Model<std::decay_t<T>>{std::forward<T>(val)}} {}
Value(const Value& val) = delete;
Value(Value&&) = default;