www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4942] New: Cannot use std.container.Array with a struct as type parameter

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4942

           Summary: Cannot use std.container.Array with a struct as type
                    parameter
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: rsaarelm gmail.com



---
Tried to build the following on 64-bit Linux with DMD v2.049:

----
import std.container;

struct X {
  int a;
}

void main() {
  auto c = Array!X();
}
----

I get this error message:
src/phobos/std/container.d(1485): Error: template instance template 'hasElabo
rateDestructor' is not defined                                                  
src/phobos/std/container.d(1485): Error: hasElaborateDestructor!(X) is not an
 expression

It looks like hasElaborateDestructor is not defined anywhere in the source
tree.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 26 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4942


Stephan Dilly <spam extrawurst.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|x86_64                      |All
         OS/Version|Linux                       |All



---
i can confirm this does not work under win32 either. what is the use of a
container that one cannot store user defined types in ? and where is the
missing hasElaborateDestructor template ?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 28 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4942


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei metalanguage.com
         AssignedTo|nobody puremagic.com        |andrei metalanguage.com


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 04 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4942


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED



11:19:55 PST ---
Fixed in http://www.dsource.org/projects/phobos/changeset/2364

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