alias TL_1 = MatchReturnType!(void delegate(), void function(), void function( string foo)); assertTrue(is(TL_1 == void)); assertFalse(is(TL_1 == string)); alias TL_2 = MatchReturnType!(string delegate(), string function(), string function( int foo), () => null); assertTrue(is(TL_2 == string)); assertTrue(is(MatchReturnType!(() => "atum") == string));
Match functions return type
This template match the return type of the passed functions and fail if there's more than one type (except typeof(null))