1974 shaares
6 private links
6 private links
4 results
tagged
cpp14
As you might be aware, C++ doesn't excel when it comes to examine the type or properties of an object at runtime. The best ability provided by default would be RTTI. Not only RTTI isn't always available, but it also gives you barely more than the current type of the manipulated object. Dynamic languages or those having reflection on the other hand are really convenient in some situations like serialization.
Asm<int>(
MOV(ecx, 5_d),
MOV(eax, 0_d),
"start"_label,
CMP(ecx, 0_d),
JE("done"_rel8),
ADD(eax, 6_d),
DEC(ecx),
JMP("start"_rel8),
"done"_label,
RET()
);