The error got resolved by @Someprogrammerdude comment about a is_same_v
helper variable template defined here. My final code is
#ifdef My_OLD_TOOL_CHAIN
template< class T, class U >
inline constexpr bool is_same_v = std::is_same<T, U>::value;
template<class T, class O = T>
using IteratorOnly = std::enable_if_t<
!is_same_v<typename std::iterator_traits<T>::value_type, void>, O
>;
#else // My_OLD_TOOL_CHAIN
template<class T, class O = T>
using IteratorOnly = std::enable_if_t<
!std::is_same_v<typename std::iterator_traits<T>::value_type, void>, O
>;
#endif // My_OLD_TOOL_CHAIN
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…