This is from an example from a tutorial on std::enable_if
.
Here is more context:
// handle signed types
template<typename Int>
auto incr1(Int& target, Int amount)
-> std::void_t<int[static_cast<Int>(-1) < static_cast<Int>(0)]>;
- Shouldn't
std::void_t
be accepting a type as template argument? - What is the purpose of
int[]
in this context?