WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
140905
Add match_constness<Reference, T> helper struct
https://bugs.webkit.org/show_bug.cgi?id=140905
Summary
Add match_constness<Reference, T> helper struct
Chris Dumez
Reported
2015-01-26 15:09:25 PST
Add match_constness<Reference, T> helper struct to simplify downcast<>() a bit. The purpose of this helper is to update T's constness to match Reference's.
Attachments
Patch
(2.77 KB, patch)
2015-01-26 15:10 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2015-01-26 15:10:38 PST
Created
attachment 245379
[details]
Patch
Chris Dumez
Comment 2
2015-01-27 20:38:33 PST
ping review?
Benjamin Poulain
Comment 3
2015-01-30 15:28:53 PST
Comment on
attachment 245379
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=245379&action=review
> Source/WTF/wtf/TypeCasts.h:72 > + typedef typename std::conditional<std::is_const<Reference>::value, typename std::add_const<T>::type, typename std::remove_const<T>::type>::type type;
The last type should be Type.
Chris Dumez
Comment 4
2015-01-30 15:31:21 PST
Comment on
attachment 245379
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=245379&action=review
>> Source/WTF/wtf/TypeCasts.h:72 >> + typedef typename std::conditional<std::is_const<Reference>::value, typename std::add_const<T>::type, typename std::remove_const<T>::type>::type type; > > The last type should be Type.
I kinda like the consistency with STL here.
Chris Dumez
Comment 5
2015-01-30 15:31:57 PST
Comment on
attachment 245379
[details]
Patch Clearing flags on attachment: 245379 Committed
r179416
: <
http://trac.webkit.org/changeset/179416
>
Chris Dumez
Comment 6
2015-01-30 15:32:02 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