On Saturday, 23 March 2024 at 20:38:40 UTC, Jonathan M Davis wrote:
On Saturday, March 23, 2024 1:30:29 PM MDT Menjanahary R. R. via Digitalmars- d-learn wrote:
[...]

Well, when nextPrime is instantiated, the type of T is inferred from the function argument. So, if num is int, then T is int, whereas if num is const int, then T is const int. The same with isPrime.

[...]

Thanks for your prompt answer. It works like a charm.

It's always a pleasure to learn from the Dlang community.

Reply via email to