Testing for object property supporting "<" comparison
Paul Backus
snarwin at gmail.com
Wed May 12 00:06:52 UTC 2021
On Tuesday, 11 May 2021 at 19:42:34 UTC, Chris Piker wrote:
> My problem is that I don't know how to specify that properties
> must be comparable via "<". I took a look at the Traits
> module, but there are more things that are comparable then
> Arithmetic or Floating point types. Also, since the compiler
> will catch objects that don't have these properties, maybe an
> enum check is not worth implementing.
std.traits.isOrderingComparable
https://phobos.dpldocs.info/std.traits.isOrderingComparable.html
More information about the Digitalmars-d-learn
mailing list