Make WTF::Optional work with mdvc 2013 by using std::aligned_memory instead of an unrestricted union internally. MSVC 2013 still does not support unrestricted unions.
Created attachment 244531 [details] Patch
Comment on attachment 244531 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=244531&action=review > Source/WTF/wtf/Optional.h:65 > + new (&m_value) T(*other.asPtr()); I still think you want NotNull here. > Source/WTF/wtf/Optional.h:72 > + new (&m_value) T(WTF::move(*other.asPtr())); I still think you want NotNull here. > Source/WTF/wtf/Optional.h:78 > + new (&m_value) T(WTF::move(value)); NotNull. > Source/WTF/wtf/Optional.h:85 > + new (&m_value) T(std::forward<Args>(args)...); NotNull. > Source/WTF/wtf/Optional.h:106 > + new (&m_value) T(*other.asPtr()); NotNull. > Source/WTF/wtf/Optional.h:-138 > - template<typename U> > - Optional& operator=(U&& u) What happened to this overload? > Source/WTF/wtf/Optional.h:119 > + new (&m_value) T(WTF::move(*other.asPtr())); NotNull.
Created attachment 244535 [details] Patch
Comment on attachment 244531 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=244531&action=review >> Source/WTF/wtf/Optional.h:65 >> + new (&m_value) T(*other.asPtr()); > > I still think you want NotNull here. Right, done. >> Source/WTF/wtf/Optional.h:-138 >> - Optional& operator=(U&& u) > > What happened to this overload? I had trouble getting it to build initially and forgot to add it back. It is back in.
Comment on attachment 244535 [details] Patch Clearing flags on attachment: 244535 Committed r178372: <http://trac.webkit.org/changeset/178372>
All reviewed patches have been landed. Closing bug.