On Friday, 26 July 2019 at 14:56:37 UTC, Andrey Zherikov wrote:
Even without static if I get the same result:
mixin template my_import(alias modName)
{
mixin("import " ~ modName ~ ";");
}
mixin my_import!"mymod";
pragma(msg,fullyQualifiedName!(myfunc)); // Error:
undefined identifier
On Thursday, 25 July 2019 at 14:20:03 UTC, Ali Çehreli 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 restrictions? It's fundamental idea or
tempora
On Thursday, July 25, 2019 6:13:38 PM MDT Mike Franklin via Digitalmars-d-
learn wrote:
> 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 cur
Can someone help me understand the details around why this fails?
import std;
struct W(T) {
T value;
auto hook(handlers...)() {
return handlers[0](value);
}
}
template f(handlers...) {
auto ref f(T)(auto ref T value) {
return value.hook!handlers;
}
}
@nogc v
On Friday, 26 July 2019 at 16:20:10 UTC, aliak wrote:
Can someone help me understand the details around why this
fails?
import std;
struct W(T) {
T value;
auto hook(handlers...)() {
return handlers[0](value);
}
}
template f(handlers...) {
auto ref f(T)(auto ref T value
On Friday, 26 July 2019 at 16:21:52 UTC, aliak wrote:
On Friday, 26 July 2019 at 16:20:10 UTC, aliak wrote:
Can someone help me understand the details around why this
fails?
import std;
struct W(T) {
T value;
auto hook(handlers...)() {
return handlers[0](value);
}
}
templ
On Friday, 26 July 2019 at 03:42:58 UTC, Andrey Zherikov wrote:
Is there a way to check whether some module, say "foo", is
available for import before doing "import foo"?
static if (is(typeof((){import that.module.here;}))) {
// it is available
}
On Friday, 26 July 2019 at 14:19:05 UTC, Paul Backus wrote:
version(HasStdio)
import std.stdio;
else
pragma(msg, "std.stdio is not available");
Then configure your build system to pass `-version=HasStdio` to
dmd (or the equivalent flag to ldc or gdc) when std.stdio is
available.
I wa
On Friday, 26 July 2019 at 14:14:11 UTC, Anonymouse wrote:
I use __traits(compiles, __traits(identifier, moduleName)) now
instead and it seems to work.
I couldn't find "identifier" docs on
https://dlang.org/phobos/std_traits.html. But I tried and it
doesn't work - I think because is unknown
On Friday, 26 July 2019 at 06:24:18 UTC, evilrat wrote:
On Friday, 26 July 2019 at 03:42:58 UTC, Andrey Zherikov wrote:
Is there a way to check whether some module, say "foo", is
available for import before doing "import foo"?
I did some really retarded utility like this in the past,
worked f
On Friday, 26 July 2019 at 03:42:58 UTC, Andrey Zherikov wrote:
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
shou
On Friday, 26 July 2019 at 06:24:18 UTC, evilrat wrote:
On Friday, 26 July 2019 at 03:42:58 UTC, Andrey Zherikov wrote:
bool isModuleAvailable(alias modName)() {
mixin("import " ~ modName ~ ";");
static if (__traits(compiles, mixin(modName).stringof))
return true;
Today we get to do something unusual. Drawing on and combining a
bunch of things we've done in past instalments, we'll build a
two-column ComboBox with different images, custom fonts, and
background colors for each item in the list. Here's the post:
http://gtkdcoding.com/2019/07/26/0056-mvc-ix-
On Thursday, 25 July 2019 at 12:46:48 UTC, Oleg B wrote:
What reason for such restrictions? It's fundamental idea or
temporary implementation?
I think it's a dmd limitation. Currently it has a bug that it can
still generate code for ctfe templated functions, and they will
fail to link if they
14 matches
Mail list logo