modulename
José Armando García Sancio
jsancio at gmail.com
Tue Sep 4 16:23:56 PDT 2012
On Tue, Sep 4, 2012 at 2:00 PM, Jonathan M Davis <jmdavisProg at gmx.com>wrote:
> On Tuesday, September 04, 2012 22:40:19 Andrej Mitrovic wrote:
> > On 9/4/12, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> > > But it looks like we now have std.traits.moduleName, so presumably that
> > > will do the trick.
> >
> > How will that do the trick if you don't have the reference to the
> > invoking module?
>
> Clearly, I didn't read the OP clearly enough.
>
> Unless you can get code to be generated in the calling scope (e.g. with
> mixins), then the _only_ access that you have to anything in the calling
> scope
> is with __FILE__ and __LINE__. And they only work that way because they're
> treated as special cases (they _don't_ work that way in C/C++).
C/C++ may not need __FILE__ and __LINE__ to get evaluated at the call site
because C/C++ have preprocessor macros to get around this problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20120904/356f4ff2/attachment.html>
More information about the Digitalmars-d-learn
mailing list