March 14, 2014
On Friday, 14 March 2014 at 17:54:23 UTC, bearophile wrote:
> "is" between complex values should be seen as a special tool, to be used carefully. It's not a good idea to use it widely and carelessly.

Perhaps, but when comparing between the init value it should always work because they do the same thing:

init is the bytes copied to the type when it is first declared

is compares the two sets of bytes


Since both are about a simple byte block it should be pretty well reliable.
March 15, 2014
On 14.3.2014. 17:04, Etienne wrote:
> I'm trying to compare two doubles as part of a cache framework. To put it simply, double.init == double.init ... is false?

Note that you should not compare floating point types for equality!

http://www.parashift.com/c++-faq/floating-point-arith.html

1 2
Next ›   Last »