Hi,
I've the following enumeration:
enum path : string {
log1 = /var/log1,
log2 = /var/log2
}
Now... when I try to do the following:
string subDirectory = example;
string newPath = buildPath(path.log1, subDirectory);
I get the following errors:
Error: template std.path.buildPath does
nrgyzer:
Is this a bug in std.path.buildPath() or is there anything I'm
doing wrong?
The signature of buildPath is:
immutable(C)[] buildPath(C)(const(C[])[] paths...);
But your inputs aren't of the same type. Named enum create their
own type. You give buildPath a type string and a type
== Auszug aus bearophile (bearophileh...@lycos.com)'s Artikel
nrgyzer:
Is this a bug in std.path.buildPath() or is there anything I'm
doing wrong?
The signature of buildPath is:
immutable(C)[] buildPath(C)(const(C[])[] paths...);
But your inputs aren't of the same type. Named enum create
On 05/30/12 20:34, nrgyzer wrote:
Hi,
I've the following enumeration:
enum path : string {
log1 = /var/log1,
log2 = /var/log2
}
Now... when I try to do the following:
string subDirectory = example;
string newPath = buildPath(path.log1, subDirectory);
I get the