MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / operator<

Function operator<

oneflow/maybe/optional.h:352–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350 bool operator!=(const Optional& opt) const { return !operator==(opt); }
351
352 bool operator<(const Optional& opt) const {
353 if (HasValue()) {
354 if (opt.HasValue()) {
355 return Value() < opt.Value();
356 } else {
357 return false;
358 }
359 } else {
360 return opt.HasValue();
361 }
362 }
363
364 bool operator>=(const Optional& opt) const { return !operator<(opt); }
365

Callers

nothing calls this directly

Calls 4

HasValueFunction · 0.85
ValueFunction · 0.70
HasValueMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected