Bug 4942 – Cannot use std.container.Array with a struct as type parameter

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-09-26T00:52:00Z
Last change time
2011-01-22T11:19:55Z
Keywords
rejects-valid
Assigned to
andrei
Creator
rsaarelm

Comments

Comment #0 by rsaarelm — 2010-09-26T00:52:15Z
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.
Comment #1 by spam — 2010-12-28T03:37:41Z
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 ?
Comment #2 by andrei — 2011-01-22T11:19:55Z