`std::decay` and perfect forwarding

Once again, @kerrek-sb explains how to correctly use std:decay when implementing perfect forwarding (both in C++11 and C++14) Here's the answer. I found myself in a similar situation. Namely, I was trying to implement a generic algorithm via tag dispatching. namespace detail { template<class Range>…