On Monday, 17 April 2017 at 10:55:30 UTC, Jonathan M Davis wrote:
They works, but it results in a new template being instantiated
for every call, so you really shouldn't use __FILE__ or
__LINE__ as template arguments if you can avoid it.
Does it matter if I anyway use template (S...) ?
And what problem with that new templates for every call?
Increases .exe size? Needs more memory (runtime? compile-time?)?
Something else?
Usually, the better way to handle it is to use runtime
arguments, e.g.
void error(string msg, string file = __FILE__, size_t line =
__LINE__)
Is possible use this with (S...)? In some cases I use many
arguments (5-10, mixed strings and numbers) and I tried to avoid
the concatenation them into string.
What will be better? Concatenation or templates? Or maybe an
another way?