www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Add file info to RTInfo

How about adding file info to the RTInfo template. Currently the 
template look like this:

template RTInfo(T)
{
     enum RTInfo = cast(void*)0x12345678;
}

How about changing the parameters to this:

template RTInfo(T, string mod = __MODULE__, string file = __FILE__, 
size_t line = __LINE__)
{
     enum RTInfo = cast(void*)0x12345678;
}

Does that even work? I mean, the compiler is instantiating that template.

-- 
/Jacob Carlborg
Jun 04 2013