std.database

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 1 19:07:54 PST 2016


Okay I've found a problem.

Here is some code demonstrating it.
http://dpaste.dzfl.pl/022c9e610a18

Now take a look again at Database 
https://github.com/cruisercoder/dstddb/blob/master/src/std/database/poly/database.d#L37

Do you see the problem?
The solution is simple.

The client database type can be a struct or a class. It doesn't matter 
too much (assuming you're going the way of ranges).
But the intermediary representation must be on the heap and should 
probably use the constructor and not a static create method to get it.
This way people can use other memory management solutions and construct 
it however they like.


More information about the Digitalmars-d mailing list