std.serialization: pre-voting review / discussion

Jacob Carlborg doob at me.com
Mon Aug 19 08:05:17 PDT 2013


On 2013-08-19 15:47, Dicebot wrote:

> Ok, I'll investigate related part of package a bit more in details
> during this week and see if I can suggest something.

What I have now is something like this:

auto foo = new Foo;
foo.a = 3;

auto archive = new XmlArchive!(string); // string is the range type
auto serializer = new Serializer(archive);

serializer.serialize(foo);
auto data = archive.data; // returns a range, typed as XmlArchiveData

The problem now is that the range type is "string", so I can't set the 
data using any other range type:

archive.data = data;

Results in:

Error: cannot implicitly convert expression (range) of type 
XmlArchiveData to string

How can I handle that?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list