std.database
Erik Smith via Digitalmars-d
digitalmars-d at puremagic.com
Tue Mar 1 13:34:08 PST 2016
Typo fixed - thanks. Incidentally, I'm not 100% content with
createDatabase. With the library being template based, the types
are no longer as easy to work with directly:
auto database = Database!DefaultPolicy();
alias cant be used because it instantiates. The template
argument can be defaulted, but the best I can do is this:
auto database = Database!()();
It would be nice if the compiler invoked the default type without
the extra !(). I settled on using a no parameter template
function named createDatabase. I would have liked just
database() to match the other member function style in the
package, but I think that might be injecting a name that might be
too common as a variable name.
Project minutiae.
erik
More information about the Digitalmars-d
mailing list