On Monday, 14 July 2014 at 18:43:36 UTC, Ali Çehreli wrote:
It is guaranteed by the language spec that yes, myFunction()
takes an A by reference. However, you can't know where that A
is coming from; so, the safety of that cast is up to you.
Consider:
void foo(A a) // <-- Already sliced
{
myFunction(a); // <-- Will perform invalid cast
}
Indeed, the code I port do that because struct have a type-tag.
