Skip to content

Instantly share code, notes, and snippets.

@danlark1
Created April 17, 2022 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danlark1/a5ac4e4566c6acb23cd1c1806bdf91e9 to your computer and use it in GitHub Desktop.
Save danlark1/a5ac4e4566c6acb23cd1c1806bdf91e9 to your computer and use it in GitHub Desktop.
// The search going up is known to be guarded but the search coming down isn't.
// Prime the downward search with a guard.
// __m still guards upward moving __i
while (__comp(*__i, *__m))
++__i;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment