http://d.puremagic.com/issues/show_bug.cgi?id=5686
--- Comment #6 from Steven Schveighoffer 2011-03-03
07:16:34 PST ---
With some testing, I discovered that it's the act of explicit instantiation
that causes the line number to be tied to the declaration line:
ptrdiff_t Test1(string name, stri
http://d.puremagic.com/issues/show_bug.cgi?id=5686
--- Comment #5 from changlon 2011-03-03 06:50:13 PST ---
---
ptrdiff_t Test1( string file = __FILE__, ptrdiff_t line = __LINE__)(){
pragma(msg, line.stringof);
return line ;
}
class Test2(string name, s
http://d.puremagic.com/issues/show_bug.cgi?id=5686
--- Comment #4 from changlon 2011-03-03 06:45:53 PST ---
The lineno shoule be the lineno where template is be instantiated, not where it
be declared .
for template and function template it is working . for class template and
class member temp
http://d.puremagic.com/issues/show_bug.cgi?id=5686
Steven Schveighoffer changed:
What|Removed |Added
CC||schvei...@yahoo.com
--- Comment
http://d.puremagic.com/issues/show_bug.cgi?id=5686
--- Comment #2 from Steven Schveighoffer 2011-03-03
06:31:04 PST ---
Can you be more specific what is the problem? 7 != 7 *is* false.
In the static assert line (line 8), __LINE__ should be 8, and line should be 7,
since the previous line con
http://d.puremagic.com/issues/show_bug.cgi?id=5686
--- Comment #1 from changlon 2011-03-03 00:27:11 PST ---
update test case:
-
class Test2(string name, string file = __FILE__, ptrdiff_t line = __LINE__){
static assert( line != __LINE__ -1 );
ptrdiff_t test( string fil