On Tuesday, 22 November 2016 at 12:21:18 UTC, Yuxuan Shui wrote:
Is there a way to get a template function return type with
instantiating it? The return type is independent of the
template arguments.
I'm asking because there's potentially recursive template
instantiation if I do try to instantiate it.
Do you control the template in question's source? If so you could
have a degenerate template type (e.g. MyTemplate!void ) that just
returns the correct types .init
Otherwise i'm not sure you can because IIRC std.traits.ReturnType
requires an instantiated symbol.