Re: [webkit-dev] Moving from WTF::Optional to std::optional

2021-06-01 Thread Chris Dumez via webkit-dev
Hi, Another thing Darin didn’t mention but I think people should be careful about: The move constructor for std::optional does not clear the is-set flag (while the one for WTF::Optional did). As a result, you will be having a very bad time if you do a use-after-move of a std::optional. Please

[webkit-dev] Moving from WTF::Optional to std::optional

2021-06-01 Thread Darin Adler via webkit-dev
Hi folks. We’re getting rid of the WTF::Optional class template, because, hooray, std::optional is supported quite well by all the C++17 compilers we use, and we don’t have to keep using our own special version. Generally we don’t want to reimplement the C++ standard library when there is not