Capturing caller's file/line number in variadic template functions
Kevin Cox
kevincox.ca at gmail.com
Fri Mar 16 11:31:47 PDT 2012
On Mar 16, 2012 2:29 PM, "Adam D. Ruppe" <destructionator at gmail.com> wrote:
>
> Put the string file = blaha in the template argument list,
> before the variadic.
>
> voic checkConsistency(string file = __FILE__, int line = __LINE__,
T...)(T t) {
>
>
But then you have to write it each time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20120316/d19910c1/attachment.html>
More information about the Digitalmars-d-learn
mailing list