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.
Created attachment 245379 [details] Patch
ping review?
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.
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.
Comment on attachment 245379 [details] Patch Clearing flags on attachment: 245379 Committed r179416: <http://trac.webkit.org/changeset/179416>
All reviewed patches have been landed. Closing bug.