trace - multiple declarations

Template trace

Debugging aid: Output current file/line to stderr.

Also flushes stderr to ensure buffering and a subsequent crash don't cause the message to get lost.

Arguments

template trace();

Functions

Function name Description
trace

Example

// Output example:
// src/myproj/myfile.d(42): trace
trace();

Template trace

Debugging aid: Output variable name/value and file/line info to stderr.

Also flushes stderr to ensure buffering and a subsequent crash don't cause the message to get lost.

Arguments

template trace(alias var);

Functions

Function name Description
trace

Example

auto x = 5;
auto str = "Hello";

// Output example:
// src/myproj/myfile.d(42): x: 5
// src/myproj/myfile.d(43): str: Hello
trace!x;
trace!str;

Authors

Nick Sabalausky

Copyright

Copyright (C) 2014-2017 Nick Sabalausky

License

zlib/libpng