50 hierarchies, 1000 objects each
Compiler: clang 12.0.1 (release)
Load average: 1.93, 3.07, 2.32
Run on (8 X 2112 MHZ CPUs)
CPU caches:
L1 Data 32768 KiB (x2)
L1 Instruction 32768 KiB (x2)
L2 Unified 262144 KiB (x2)
L3 Unified 8388608 KiB (x8)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set(MACROLAB macrolab.cpp) | |
add_custom_command( | |
OUTPUT ${MACROLAB} | |
COMMAND ${CMAKE_BUILD_TOOL} lab.i | |
COMMAND clang-format ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/lab.dir/lab.cpp.i > ${MACROLAB} | |
DEPENDS lab.cpp | |
) | |
add_custom_target( | |
${MACROLAB} | |
COMMAND make lab.i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template Params(alias fun) { | |
static if (is(typeof(fun) P == __parameters)) { | |
alias Params = P; | |
} | |
} | |
template forward(alias fun) { | |
static foreach(idx, overload; __traits(getOverloads, __traits(parent, fun), __traits(identifier, fun))) | |
@(__traits(getAttributes, overload)) auto forward(Params!overload p) { | |
return fun(p); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void foo(virtual A, double) {} // 1 | |
void foo(double, virtual A) {} // 2 | |
void foo(virtual A, virtual A) {} // 3 | |
override void foo(virtual B, double) {} // override 1 | |
override void foo(double, virtual B) {} // override 2 | |
override void foo(virtual A, virtual B) {} // override 3 | |
override void foo(virtual B, virtual A) {} // override 3 | |
override void foo(virtual B, virtual B) {} // override 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module common; | |
class A {} | |
class B : A {} | |
class C : B {} | |
void foo(virtual A) {} | |
// --- |