[Issue 4018] __FILE__ and __LINE__ as default template parameters not set to instantiation point per spec

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 20 22:29:18 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=4018


dawg at dawgfoto.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dawg at dawgfoto.de


--- Comment #4 from dawg at dawgfoto.de 2012-03-20 22:29:35 PDT ---
This only happens with explicit instantiations foo!(targs)(args).
In that case semantic is run in a different scope.
A workaround for functions is to split the parameters into explicit
and default parameters.

template foo(T)
{
    void foo(size_t line = __LINE__)()
    {
        pragma(msg, line);
    }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list