bytedeco / javacpp

The missing bridge between Java and native C++
Other
4.46k stars 581 forks source link

Add reset() to optional containers #696

Closed HGuillemet closed 1 year ago

HGuillemet commented 1 year ago

What about adding reset() to optional container ? The only alternative to clear the value of an optional I'm aware of, is to assign from a default-constructed optional:

  MyOptional optional;
  ...
  optional.put(new MyOptional())