Thread overview | |||||
---|---|---|---|---|---|
|
November 21, 2009 [Issue 3539] New: Template instantiation fails in an obscured way. See details. | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=3539 Summary: Template instantiation fails in an obscured way. See details. Product: D Version: 2.036 Platform: x86 OS/Version: Linux Status: NEW Severity: blocker Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: e.insafutdinov@gmail.com --- Comment #0 from Eldar Insafutdinov <e.insafutdinov@gmail.com> 2009-11-21 14:44:06 PST --- Test case: void boo(T)(T* ptr, const ref T t) { static if (__traits(compiles, ptr.__postblit())) {} } void main() { double b; const double a = b; double* ptr; boo!double(ptr, a); } Commenting out static if (...) line makes it work. Or otherwise if you call boo with non-const argument(b) it works too. This one is a blocker for QtD. Basically I need the way, to allocate a copy of a value on the C heap. In order to do that I allocate the memory chunk with malloc, then call memcpy() and then, if the value type has postblit I call it. This bugs prevents me to implement this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
November 21, 2009 [Issue 3539] Template instantiation fails in an obscured way. See details. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Eldar Insafutdinov | http://d.puremagic.com/issues/show_bug.cgi?id=3539 Eldar Insafutdinov <e.insafutdinov@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|blocker |critical --- Comment #1 from Eldar Insafutdinov <e.insafutdinov@gmail.com> 2009-11-21 14:48:34 PST --- Oh sorry my wrong, it is not that a big blocker, but I believe it is worth investigating anyway, since the issue was hard to narrow down and cost me couple of hours of identifying. Thanks. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 10, 2010 [Issue 3539] Template instantiation fails in an obscured way. See details. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Eldar Insafutdinov | http://d.puremagic.com/issues/show_bug.cgi?id=3539 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |clugdbug@yahoo.com.au Resolution| |FIXED --- Comment #2 from Don <clugdbug@yahoo.com.au> 2010-02-09 23:56:07 PST --- This was fixed in DMD2.037. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation