WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
140401
Make WTF::Optional work with msvc 2013
https://bugs.webkit.org/show_bug.cgi?id=140401
Summary
Make WTF::Optional work with msvc 2013
Chris Dumez
Reported
2015-01-13 11:45:14 PST
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.
Attachments
Patch
(5.14 KB, patch)
2015-01-13 11:57 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(5.04 KB, patch)
2015-01-13 12:22 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2015-01-13 11:57:20 PST
Created
attachment 244531
[details]
Patch
Anders Carlsson
Comment 2
2015-01-13 12:02:43 PST
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.
Chris Dumez
Comment 3
2015-01-13 12:22:51 PST
Created
attachment 244535
[details]
Patch
Chris Dumez
Comment 4
2015-01-13 12:24:15 PST
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.
WebKit Commit Bot
Comment 5
2015-01-13 13:21:40 PST
Comment on
attachment 244535
[details]
Patch Clearing flags on attachment: 244535 Committed
r178372
: <
http://trac.webkit.org/changeset/178372
>
WebKit Commit Bot
Comment 6
2015-01-13 13:21:46 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug