about summary refs log tree commit diff
path: root/src/rt/rust_stack.cpp
diff options
context:
space:
mode:
authorblake2-ppc <blake2-ppc>2013-08-08 22:07:21 +0200
committerblake2-ppc <blake2-ppc>2013-08-08 22:07:21 +0200
commit5d9fd882b7ebb911daf0f21ca81f4acc599c2686 (patch)
treeda9a5ac786a286381ad6b0204dea4f1cfecddc8e /src/rt/rust_stack.cpp
parent98ec79c9576052d9fededd3b72b47d387c1c455d (diff)
downloadrust-5d9fd882b7ebb911daf0f21ca81f4acc599c2686.tar.gz
rust-5d9fd882b7ebb911daf0f21ca81f4acc599c2686.zip
Add std::iterator::order with lexical ordering functions for sequences
Use Eq + Ord for lexicographical ordering of sequences.

For each of <, <=, >= or > as R, use::

    [x, ..xs] R [y, ..ys]  =  if x != y { x R y } else { xs R ys }

Previous code using `a < b` and then `!(b < a)` for short-circuiting
fails on cases such as  [1.0, 2.0] < [0.0/0.0, 3.0], where the first
element was effectively considered equal.
Diffstat (limited to 'src/rt/rust_stack.cpp')
0 files changed, 0 insertions, 0 deletions