http://d.puremagic.com/issues/show_bug.cgi?id=4636
Summary: scoped + private constructor Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: dsim...@yahoo.com --- Comment #0 from David Simcha <dsim...@yahoo.com> 2010-08-12 18:33:26 PDT --- import std.typecons; class Foo { private this(int num) {} } void main() { auto s = scoped!Foo(1); } d:\dmd2\windows\bin\..\..\src\phobos\std\conv.d(3903): Error: static assert "Don't know how to initialize an object of type Foo with arguments (int _param_1)" d:\dmd2\windows\bin\..\..\src\phobos\std\typecons.d(2314): instantiated from here: emplace!(Foo,int) test9.d(8): instantiated from here: scoped!(Foo,int) Changing the c'tor to public fixes this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------