Detecting whether something is (boost) range with SFINAE
问题 For logging code, I would like to detect whether given argument to a template function can be iterated over using the tools from Boost.Range or not. Obviously I need to instantiate different code whether it is or not, so I need SFINAE, possibly (well, certainly) combined with boost::enable_if. I've tried detecting whether begin and end free functions are defined, like this: namespace is_range_impl { template <typename T> T &make(); struct any { template <class T> any(T const&); }; struct not