On Sun, 2017-06-04 at 21:32 +0200, Jacob Carlborg via Digitalmars-d-
learn wrote:
> On 2017-06-04 19:05, Patrick Schluter wrote:
>
> > buildPath("/usr/bin", "/usr/bin/gcc")
> >
> > /usr/bin/usr/bin/gcc is obviously wrong.
>
> Says who? It might be exactly what I want. The case that came up is
On Sun, 2017-06-11 at 13:21 +, Ryan Frame via Digitalmars-d-learn
wrote:
> On Sunday, 4 June 2017 at 18:15:36 UTC, Russel Winder wrote:
> > On Sun, 2017-06-04 at 17:56 +0200, Jacob Carlborg via
> > Digitalmars-d- learn wrote:
> > > On 2017-06-04 07:44, Jesse Phillips wrote:
> > >
> > > >
On Sunday, 4 June 2017 at 18:15:36 UTC, Russel Winder wrote:
On Sun, 2017-06-04 at 17:56 +0200, Jacob Carlborg via
Digitalmars-d- learn wrote:
On 2017-06-04 07:44, Jesse Phillips wrote:
> What is your expected behavior? Throw an exception? You can't
> really
> append an absolute path to
On 2017-06-04 19:05, Patrick Schluter wrote:
buildPath("/usr/bin", "/usr/bin/gcc")
/usr/bin/usr/bin/gcc is obviously wrong.
Says who? It might be exactly what I want. The case that came up is
inside DStep. The user provides a set of files C header to be translated
to D modules. The user
On Sun, 2017-06-04 at 17:56 +0200, Jacob Carlborg via Digitalmars-d-
learn wrote:
> On 2017-06-04 07:44, Jesse Phillips wrote:
>
> > What is your expected behavior? Throw an exception? You can't
> > really
> > append an absolute path to another.
>
> Of course you can. I expect buildPath("/foo",
On Sunday, 4 June 2017 at 15:56:58 UTC, Jacob Carlborg wrote:
On 2017-06-04 07:44, Jesse Phillips wrote:
What is your expected behavior? Throw an exception? You can't
really
append an absolute path to another.
Of course you can. I expect buildPath("/foo", "/bar") to result
in "/foo/bar".
On 2017-06-04 07:44, Jesse Phillips wrote:
What is your expected behavior? Throw an exception? You can't really
append an absolute path to another.
Of course you can. I expect buildPath("/foo", "/bar") to result in
"/foo/bar". That's how Ruby behaves.
--
/Jacob Carlborg
On Saturday, 3 June 2017 at 14:12:03 UTC, Russel Winder wrote:
I have no idea what drugs the person who chose that last one to
be correct semantics was on at the time, but it was some
seriously bad stuff.
Of all people, I certainly didn't expect you to stray so far from
the tone appropriate
On 2017-06-03 16:12, Russel Winder via Digitalmars-d-learn wrote:
From the manual page on std.path.buildPath:
writeln(buildPath("foo", "bar", "baz")); // "foo/bar/baz"
writeln(buildPath("/foo/", "bar/baz")); // "/foo/b
From the manual page on std.path.buildPath:
writeln(buildPath("foo", "bar", "baz")); // "foo/bar/baz"
writeln(buildPath("/foo/", "bar/baz")); // "/foo/bar/baz"
writeln(buildPath("/foo", "/bar"
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
the following errors:
Error: template std.path.buildPath does not match any function template
declaration
Error: template std.path.buildPath(C) if (isSomeChar!(C)) cannot deduce
template function from argument types !()(path,string)
Error: template std.path.buildPath does not match any function template
14 matches
Mail list logo