digitalmars.D.bugs - [Issue 8884] New: std.array RefAppender do not works with .ptr
- d-bugmail puremagic.com (43/43) Oct 24 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8884
- d-bugmail puremagic.com (12/12) Oct 24 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8884
http://d.puremagic.com/issues/show_bug.cgi?id=8884 Summary: std.array RefAppender do not works with .ptr Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: bioinfornatics gmail.com --- Comment #0 from bioinfornatics <bioinfornatics gmail.com> 2012-10-24 05:32:25 PDT --- it seem RefAppender do not works with .ptr array property _____________________________________ This code give: [0, 1, 2, 3, 4, 5, 6, 7] ----------------------- import std.stdio; import std.array; void main(){ size_t[] a =[ 0,1,2,3 ]; auto a2 = appender( &a ); a2.put( [4, 5, 6, 7 ] ); writeln( a ); } _____________________________________ This code give: Error: template std.array.appender does not match any function template declaration Error: template std.array.appender cannot deduce template function from argument types !()(ulong*) ----------------------- import std.stdio; import std.array; void main(){ size_t[] a =[ 0,1,2,3 ]; auto a2 = appender( a.ptr ); a2.put( [4, 5, 6, 7 ] ); writeln( a ); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 24 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8884 bioinfornatics <bioinfornatics gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX --- Comment #1 from bioinfornatics <bioinfornatics gmail.com> 2012-10-24 07:08:38 PDT --- after bernardth explanation i see that is not a but but diferrence between & and .ptr is a little confusing -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 24 2012