MCPcopy Create free account
hub / github.com/pybind/pybind11 / ~OptionalProperties

Method ~OptionalProperties

tests/test_stl.cpp:103–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101 OptionalProperties() : value(EnumType::kSet) {}
102 OptionalProperties(const OptionalProperties &) = default;
103 ~OptionalProperties() {
104 // Reset value to detect use-after-destruction.
105 // This is set to a specific value rather than nullopt to ensure that
106 // the memory that contains the value gets re-written.
107 value = EnumType::kUnset;
108 }
109
110 OptionalEnumValue &access_by_ref() { return value; }
111 OptionalEnumValue access_by_copy() { return value; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected