Thanks for all your answers!
On Thursday, 22 October 2020 at 16:03:45 UTC, H. S. Teoh wrote:
On Thu, Oct 22, 2020 at 03:32:57PM +, Andrey Zherikov via
Digitalmars-d-learn wrote:
There are two ways how __FILE__, __LINE__ etc. can se used in
function parameters: as regular parameters and as template
parameters:
[...]
W
On Thu, Oct 22, 2020 at 03:32:57PM +, Andrey Zherikov via
Digitalmars-d-learn wrote:
> There are two ways how __FILE__, __LINE__ etc. can se used in function
> parameters: as regular parameters and as template parameters:
[...]
> What is recommended way?
> What are pros/cons of each case?
I d
There are two ways how __FILE__, __LINE__ etc. can se used in
function parameters: as regular parameters and as template
parameters:
void rt(string file=__FILE__, int line=__LINE__, string
func=__FUNCTION__)
{
writeln(file,"(",line,"): ",func);
}
void ct(string file=__FILE__, int line=__