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

Method Reset

oneflow/maybe/optional.h:64–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 bool HasValue() const { return has_; }
63
64 void Reset() {
65 if (has_) {
66 has_ = false;
67 Value().~T();
68 }
69 }
70
71 void Destory() {
72 if (has_) { Value().~T(); }

Callers 3

TESTFunction · 0.45
optional.hFile · 0.45
ResetFunction · 0.45

Calls 1

ValueFunction · 0.70

Tested by 1

TESTFunction · 0.36