[Issue 5939] Cannot copy std.algorithm.map

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 7 13:57:07 PST 2012


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


dawg at dawgfoto.de changed:

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


--- Comment #10 from dawg at dawgfoto.de 2012-02-07 13:57:03 PST ---
>Perhaps changing map to make its inner struct 'static' (so it won't require a
>context pointer) will do the trick.

This is a no-go, it would break every map parameter that needs a frame pointer.
----
int base = 2;
map!(a => a + base)(new int[](10));
----

What we should do to solve this is to infer if a templated struct really needs
a frame pointer, thus creating less nested structs in the first place.

Other than that it doesn't make sense to allow instantiation of nested structs
outside of their scope. We should refine the specification.

-- 
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