C++ (Qt)template <class Container>void some_algorithm(const Container & c){ std::some_algorithm(c.begin(), c.end());}
C++ (Qt)template <class T>using range = std::pair<T, T>; template <class T>range<typename T::const_iterator> make_range(const T & src){ return range<typename T::const_iterator>(std::begin(src), std::end(src));} template <class T1, class It1, class It2>T1 replace(const T1 & src, const range<It1> & before, const range<It2> & after){...}
C++ (Qt)std::list<int> src = {1,2,3,4,5,6,7,8,9, 10};std::vector<int> before = {2,3,4};std::array<int, 5> after = {-2,-3,-4,-5,-6}; auto out = replace(src, make_range(before), make_range(after));