oops this went into the wrong forum! Sorry! I will repost
this as a compiler issue, any moderator feel free to delete this
post.
Forgot to mention: I'm using DMD, and the Windows 10 is 64 bit.
When compiling my project using v2.098.0 or v2.098.1 on Windows
10, this error just appeared:
: fatal error LNK1318: Unerwarteter PDB-Fehler: OK (0) "".
Error: linker exited with status 1318
"Unerwarteter PDB-Fehler" means "Unexpected PDB-error". The next
3 attempts to compile yielded the
Microsofts C++ compiler provides the __debugbreak function, which
on x86 emits interrupt 3, which will cause the debugger to halt.
What is the equivalent in D? I tried using raise(SIGINT) from
core.stdc.signal, but that just closes the debugger (I thought
that was the same, seems like I was
On Saturday, 23 October 2021 at 20:24:32 UTC, Tim wrote:
import std.traits, std.stdio;
string generateLogCode(alias func)()
{
string code = "writeln(";
code ~= "\"" ~ fullyQualifiedName!func ~ "(\"";
foreach(i, param; ParameterIdentifierTuple!func)
{
if(i)
On Saturday, 23 October 2021 at 19:03:41 UTC, Tim wrote:
On Saturday, 23 October 2021 at 18:56:48 UTC, Simon wrote:
And I tried to use your suggestion like this:
enum OUTPUT_REPRO_CASE(alias func = __traits(parent, {})) =
"build the actual code stuff with"~fullyQualifiedName!func~"
and so
On Saturday, 23 October 2021 at 18:36:27 UTC, Tim wrote:
On Saturday, 23 October 2021 at 18:23:47 UTC, Simon wrote:
So what I am looking for then is the equivalent to
__FUNCTION__ that evaluates to the actual symbol of the
function instead of its name, so it can be used as a parameter
to
For debugging purposes, I have built a mixin that will, when
declared inside a function, output code to the console that will
reproduce the exact function call.
So, as an example, for the following function
int reproducible_function(int a, int b){
On Friday, 31 January 2020 at 14:01:04 UTC, Minty Fresh wrote:
On Thursday, 30 January 2020 at 21:36:53 UTC, Adam D. Ruppe
wrote:
On Thursday, 30 January 2020 at 21:09:41 UTC, Simon wrote:
How do I revert my variable to the init state?
null is the initial state for those.
More generally,
On Thursday, 30 January 2020 at 21:18:04 UTC, MoonlightSentinel
wrote:
On Thursday, 30 January 2020 at 21:09:41 UTC, Simon wrote:
Hi dlang community,
I'm trying to implement a "reset" functionality which should
revert all variables to the program start initial state.
Example:
import Graph;
Hi dlang community,
I'm trying to implement a "reset" functionality which should
revert all variables to the program start initial state.
Example:
import Graph;
protected Edge[string] m_string2edge;
int main()
{
// adding some elements
// not important how it works
//
Hi Guys!
In my programm, I have a custom String-type that I want to
initialize some variables of at compile time by casting a string
literal to said custom String type. I thought I could achieve
this straight forwardly, but after trying a bit, I could not find
a (simple) working solution. I
On Saturday, 23 March 2019 at 13:04:10 UTC, kinke wrote:
On Saturday, 23 March 2019 at 11:35:45 UTC, Simon wrote:
Is there any way to end up with the correct mangled function
signature, using only pointer types?
The problem is that the C++ compiler uses head-const for the
array param (`float
Hi,
I experienced some trouble with DMD today, while trying to
declare an external C++ function in D, that gets linked from a
C++ compiled object file.
The C++ function that I want to link against is declared as
follows:
bool ColorEdit4(const char* label, float col[4], int flags = 0);
On Saturday, 9 March 2019 at 09:12:13 UTC, Dennis wrote:
On Friday, 8 March 2019 at 11:42:11 UTC, Simon wrote:
Thanks, this works flawlessly. Out of interest: what is the
"enum" doing there? I had the exact same behaviour in a
function before, that I only called at compile-time, so why
did it
On Thursday, 7 March 2019 at 21:50:17 UTC, Johannes Loher wrote:
```
enum profile_scope(string name) = "import core.stdc.stdio :
printf;
printf(\""
~ name ~ "\n\"); scope(exit) printf(\"" ~ name ~ "\n\");";
extern (C) void main()
{
mixin(profile_scope!"func1");
}
```
This uses string
On Thursday, 7 March 2019 at 20:34:48 UTC, Johannes Loher wrote:
auto profile_scope(string name)
{
import std.format : format;
return q{import std.stdio : writeln; writeln("%1$s");
scope(exit)
writeln("%1$s");}.format(name);
}
void main()
{
mixin(profile_scope("func1"));
}
Is
Hello,
I am currently porting the frontend of my instrumenting profiler
to D. It features a C++-makro that profiles the time between
entering and leaving a scope (achieved with con-/destructors in
C++). Since D has scopeguards, I hoped to achieve this by
creating a mixin that generates the
18 matches
Mail list logo