You can strip off any attribute with SetFunctionAttributes:
import std.stdio;
// Adapted from std.traits.SetFunctionAttributes documentation
import std.traits;
auto assumeNoGC(T)(T t)
if (isFunctionPointer!T || isDelegate!T)
{
enum attrs = functionAttributes!T | FunctionAttribute.nogc;
I would like to debug a few things and need to insert print
statements to figure things out. I thought that using debug print
would be ok in nogc code?
Seems it make the compiler infer f as not nogc though so this is
basically unworkable unless I go through my entire source code
and remove th
mypackage:
internaltype.d
package struct InternalType {}
package template isInternalType(T) { ... }
externaltype.d
auto doStuff() {
return InternalType();
}
testfile.d
@("Make sure under scenario X that InternalType is returned")
unittest {
static assert(isInternalType!(typeof(doS
On Saturday, 1 September 2018 at 17:17:37 UTC, puffi wrote:
Hi,
Is it by design that when calling functions with either ubyte
or byte variables the char overload is called instead of the
int (or generic) one?
It seems this is by design.
"If two or more functions have the same match level, th
On Saturday, 1 September 2018 at 20:35:52 UTC, Per Nordlöw wrote:
On Saturday, 1 September 2018 at 19:52:14 UTC, kinke wrote:
`_Z7DtoLValP6DValue` may be suitable...
Is this a C++-symbol?
import core.demangle;
demangle("_Z7DtoLValP6DValue")
returns the same string...
It's C++.
Demangled v
On Saturday, 1 September 2018 at 19:52:14 UTC, kinke wrote:
`_Z7DtoLValP6DValue` may be suitable...
Is this a C++-symbol?
import core.demangle;
demangle("_Z7DtoLValP6DValue")
returns the same string...
On Saturday, 1 September 2018 at 19:35:53 UTC, Per Nordlöw wrote:
What should I grep for when trying to Dustmite this?
`_Z7DtoLValP6DValue` may be suitable. - I don't use dustmite and
prefer manual minimization; e.g., by adding `-vv > bla.log` to
the crashing commandline. The last lines in th
per:~/Work/knet] $ dub run --compiler=ldmd2
--build=release-nobounds
The determined compiler type "ldc" doesn't match the expected
type "dmd". This will probably result in build errors.
WARNING: A deprecated branch based version specification is used
for the dependency gmp-d. Please use numbered
On Saturday, 1 September 2018 at 18:46:32 UTC, Nordlöw wrote:
Thanks! Is there usually only apps and not libs that are
supposed to have linker flags like these?
In this specific case, I'm not sure it's a good idea to set the
linker in the dub config. Does it absolutely require gold, i.e.,
not
On Thursday, 30 August 2018 at 20:36:02 UTC, kinke wrote:
On Thursday, 30 August 2018 at 19:41:38 UTC, Nordlöw wrote:
I'm using the tar.xz for x64 Linux. Ok?
You're explicitly adding `-link-internally` in your top-level
dub.sdl:
dflags "-link-internally" platform="linux-ldc" # use GNU gold
On Saturday, 1 September 2018 at 17:08:25 UTC, Peter Alexander
wrote:
On Saturday, 1 September 2018 at 16:20:11 UTC, Dr.No wrote:
why move flush to outside the synchronized block?
flush should be thread safe. In general, yiu want as little
code as possible to run under the lock. Not that impo
Hi,
Is it by design that when calling functions with either ubyte or
byte variables the char overload is called instead of the int (or
generic) one?
On Saturday, 1 September 2018 at 16:20:11 UTC, Dr.No wrote:
why move flush to outside the synchronized block?
flush should be thread safe. In general, yiu want as little code
as possible to run under the lock. Not that important though.
trying out this approach I found to be ok except in som
On Friday, 31 August 2018 at 17:50:17 UTC, Steven Schveighoffer
wrote:
...
When you use const char* in D, it's expecting a *pointer* to be
stored at that address, not the data itself. So using it means
segfault. The static array is the correct translation, even
though it leaks implementation d
On Thursday, 30 August 2018 at 21:09:35 UTC, Peter Alexander
wrote:
On Thursday, 30 August 2018 at 19:59:17 UTC, Dr.No wrote:
I would to process the current block in parallel but priting
need to be theread-safe so I'm using
foreach(x; parallel(arr)) {
auto a = f(x);
auto res = g(a);
15 matches
Mail list logo