expression templates
dsimcha
dsimcha at yahoo.com
Tue Mar 29 12:15:47 PDT 2011
== Quote from bearophile (bearophileHUGS at lycos.com)'s article
> The operator overloading done with opCmp is too much coarse even if you want to
implement sets with operators like <= < > >= == for subset, etc.
Can you please give an example of where <=, >, etc. are useful for representing
set operations? My naive opinion (i.e. without understanding your use case) is
that using comparison operators to represent anything besides partial or total
ordering is a severe abuse of operator overloading. (Their use to represent
ordering of corresponding elements of a vector or matrix is a borderline case.)
More information about the Digitalmars-d
mailing list