[Issue 4841] -inline wrecks nested struct with alias template parameter (An array()/map inlining problem)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 27 00:35:59 PST 2012


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.059
            Summary|-inline wrecks delegate     |-inline wrecks nested
                   |literals as alias           |struct with alias template
                   |parameters (An array()/map  |parameter (An array()/map
                   |inlining problem)           |inlining problem)


--- Comment #4 from Don <clugdbug at yahoo.com.au> 2012-01-27 00:35:53 PST ---
Further reduced shows neither constructor nor delegate is required.

struct Struct4841(alias pred)
{
    void unused_func();
}

void bug4841a() {
   int w;
   Struct4841!(  w ) m;   
}

void bug4841b() {
   bug4841a();
}

----------------
The unused function is required only because it makes Struct4841 into a nested
struct.
I think it is because moving a templated nested struct changes its type - the
enclosing function is part of the mangled name, or something like that. It
can't trivially be moved around.

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