On 2/1/11 10:51 AM, Michel Fortin wrote:
On 2011-02-01 11:31:54 -0500, Andrei Alexandrescu
<seewebsiteforem...@erdani.org> said:
TypeInfo holds a pointer to the toString function, so if the compiler
passes the two operands as D-style variadic arguments to the assert
handler, the assert handler can use toString to print them. The operator
should be passed as a string.
In that case problem solved. Don, if you arrange things such that this
user-level code:
int a = 42;
double b = 3.14;
assert(a <= b, "Something odd happened");
ultimately calls this runtime function:
assertCmpFailed("<=", "42", "3.14", "Something odd happened");
I promise I'll discuss with Sean and implement what it takes in druntime
to get that completed.
We need to finalize that before Feb 7 though because on that date the
vote for Jonathan's library closes. If you do implement that, probably
we'll need to reject the library in the current form and propose back an
amended version.
Andrei