Is there a way to check whether some module, say "foo", is
available for import before doing "import foo"?
I want to create a function that imports module if it's available
or does something else otherwise. So I think the code should look
something like this:
mixin template my_import(alias
On Thursday, 25 July 2019 at 18:37:49 UTC, Jonathan M Davis wrote:
There's probably at least one bug report on it, but as I
understand it, it's not a bug in the sense that the
implementation is currently expected to handle such a case.
It's an area where betterC should be improved upon, but
On Thursday, 25 July 2019 at 21:58:06 UTC, aliak wrote:
Haha. Ironic. Thanks, again :)
Though, if you use auto ref, and you check if it's mutable and
not copyable and then move, then that means you could
potentially be applying move to an object on behalf of the
clients
auto a =
On Thursday, 25 July 2019 at 21:23:33 UTC, Paul Backus wrote:
On Thursday, 25 July 2019 at 20:38:59 UTC, aliak wrote:
On Thursday, 25 July 2019 at 19:35:36 UTC, aliak wrote:
Basically, can template W be made to handle an S that can't
be copied?
import std;
static struct S {
int i;
On Thursday, 25 July 2019 at 20:38:59 UTC, aliak wrote:
On Thursday, 25 July 2019 at 19:35:36 UTC, aliak wrote:
Basically, can template W be made to handle an S that can't be
copied?
import std;
static struct S {
int i;
@disable this(this);
this(int i) { this.i = i; }
}
[...]
On Thursday, 25 July 2019 at 19:35:36 UTC, aliak wrote:
Basically, can template W be made to handle an S that can't be
copied?
import std;
static struct S {
int i;
@disable this(this);
this(int i) { this.i = i; }
}
struct W(T) {
T value;
this(T value) {
this.value
Basically, can template W be made to handle an S that can't be
copied?
import std;
static struct S {
int i;
@disable this(this);
this(int i) { this.i = i; }
}
struct W(T) {
T value;
this(T value) {
this.value = value;
}
}
auto wrap(T)(T value) {
return
On Thursday, July 25, 2019 8:20:03 AM MDT Ali Çehreli via Digitalmars-d-
learn wrote:
> On 07/25/2019 05:46 AM, Oleg B wrote:
> > On Thursday, 25 July 2019 at 12:34:15 UTC, rikki cattermole wrote:
> >> Those restrictions don't stop at runtime.
> >
> > It's vary sad.
> >
> > What reason for such
On Wednesday, 24 July 2019 at 16:23:48 UTC, Paul Backus wrote:
On Wednesday, 24 July 2019 at 12:54:51 UTC, aliak wrote:
[...]
It should go on the constructor's parameter; i.e.,
this(auto return ref T value) { /* ... */ }
Under the hood, a constructor actually returns the constructed
value
On Thursday, 25 July 2019 at 18:06:02 UTC, Jonathan Marler wrote:
On Thursday, 25 July 2019 at 12:46:48 UTC, Oleg B wrote:
On Thursday, 25 July 2019 at 12:34:15 UTC, rikki cattermole
wrote:
Those restrictions don't stop at runtime.
It's vary sad.
What reason for such restrictions? It's
On Thursday, 25 July 2019 at 12:46:48 UTC, Oleg B wrote:
On Thursday, 25 July 2019 at 12:34:15 UTC, rikki cattermole
wrote:
Those restrictions don't stop at runtime.
It's vary sad.
What reason for such restrictions? It's fundamental idea or
temporary implementation?
Yes it is very sad.
On 07/25/2019 05:46 AM, Oleg B wrote:
On Thursday, 25 July 2019 at 12:34:15 UTC, rikki cattermole wrote:
Those restrictions don't stop at runtime.
It's vary sad.
What reason for such restrictions? It's fundamental idea or temporary
implementation?
It looks like a bug to me.
Ali
On Thursday, 25 July 2019 at 12:34:15 UTC, rikki cattermole wrote:
Those restrictions don't stop at runtime.
It's vary sad.
What reason for such restrictions? It's fundamental idea or
temporary implementation?
On 26/07/2019 12:30 AM, Oleg B wrote:
On Thursday, 25 July 2019 at 12:20:04 UTC, Mike Franklin wrote:
If you read the documentation for betterC
(https://dlang.org/spec/betterc.html#consequences) you'll see that
there are features of the D language which are not supported.
Therefore,
On Thursday, 25 July 2019 at 12:20:04 UTC, Mike Franklin wrote:
If you read the documentation for betterC
(https://dlang.org/spec/betterc.html#consequences) you'll see
that there are features of the D language which are not
supported. Therefore, libraries that use such features (e.g.
On Thursday, 25 July 2019 at 12:01:40 UTC, Oleg B wrote:
Hello everyone!
I try build this code with betterC
import core.stdc.stdio;
import std.format : format;
extern(C) int main()
{
mixin(format!`enum str = "%s\0";`("hello"));
fprintf(stderr, "%s\n", str.ptr);
return 0;
}
but
Hello everyone!
I try build this code with betterC
import core.stdc.stdio;
import std.format : format;
extern(C) int main()
{
mixin(format!`enum str = "%s\0";`("hello"));
fprintf(stderr, "%s\n", str.ptr);
return 0;
}
but compilation fails
On Wednesday, 24 July 2019 at 16:40:58 UTC, Mike Parker wrote:
On Wednesday, 24 July 2019 at 16:37:33 UTC, Greatsam4sure wrote:
On Wednesday, 24 July 2019 at 15:56:43 UTC, drug wrote:
24.07.2019 18:51, Greatsam4sure пишет:
Good day everyone. I am thinking, if there is a way to
contact any
18 matches
Mail list logo