On Thursday, 22 October 2015 at 15:10:58 UTC, pineapple wrote:
What does if(isIntegral!T) do? It looks like it would verify that the template type is a discrete number?

It doesn't verify, but filters: you can have several templates with the same name, when filter doesn't match, compiler tries another template. Maybe you can write collatzStep for string type, then this code wouldn't compile, because it doesn't make sense for strings. Remove the filter and the template will always compile with whatever it's supplied including BigNum as long as the code makes sense.

Reply via email to