On Monday, 11 May 2015 at 12:54:09 UTC, Benjamin Thaut wrote:
and why does it not map well to D ?
D uses tons of templates everywhere. Even type information for
non templated types is generated on demand and stored in
comdats which can lead to duplicate symbols the same way it
does for templates. In D the dynamic cast is basically the
default and you have to force the compiler to not use a dynamic
cast if you care for performance.
Sorry for the rookie question, but my background is C rather than
C++. How do I force a static cast, and roughly order magnitude
how big is the cost of a dynamic cast ?
Would you mean for example rather than casting a char[] to a
string taking the address and casting the pointer?