string file = __FILE__ considered harmful (and solution)
Nick Sabalausky (Abscissa)
SeeWebsiteToContactMe at semitwist.com
Wed May 30 20:24:23 UTC 2018
On 05/30/2018 10:40 AM, Steven Schveighoffer wrote:
>
> But if we fixed the behavior that causes your idea not to work, then we
> could probably easily define a function like so:
>
> CallerInfo __CALLER__(string file = __FILE__, size_t line = __LINE__)
> {
> return CallerInfo(file, line);
> }
>
Love it!
More information about the Digitalmars-d
mailing list