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


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[CTFE] Cannot create a      |[CTFE] Cannot create a
                   |nested struct if it has a   |non-static nested struct
                   |constructor                 |
         OS/Version|Mac OS X                    |All


--- Comment #5 from Don <clugd...@yahoo.com.au> 2011-12-29 02:50:58 PST ---
Actually, it doesn't need a constructor. The presence of _any_ member function
triggers the bug:

static assert({
    struct Result {
        void foo(){}
    }
    Result x;
    return true;
}());

If it doesn't have any member functions, then it is actually a static nested
struct. So true nested structs are never supported in CTFE.

It's because the hidden member of the struct needs a pointer to the enclosing
function, and this is not implemented.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to