Changeset 242235 in webkit


Ignore:
Timestamp:
Feb 28, 2019 3:33:08 PM (5 years ago)
Author:
mark.lam@apple.com
Message:

Change CheckedArithmetic to not use std::enable_if_t.
https://bugs.webkit.org/show_bug.cgi?id=195187
<rdar://problem/48464665>

Reviewed by Keith Miller.

Because C++11 does not like std::enable_if_t and there's a need to use this file with C++11.

  • wtf/CheckedArithmetic.h:
Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r242189 r242235  
     12019-02-28  Mark Lam  <mark.lam@apple.com>
     2
     3        Change CheckedArithmetic to not use std::enable_if_t.
     4        https://bugs.webkit.org/show_bug.cgi?id=195187
     5        <rdar://problem/48464665>
     6
     7        Reviewed by Keith Miller.
     8
     9        Because C++11 does not like std::enable_if_t and there's a need to use this file with C++11.
     10
     11        * wtf/CheckedArithmetic.h:
     12
    1132019-02-27  Simon Fraser  <simon.fraser@apple.com>
    214
  • trunk/Source/WTF/wtf/CheckedArithmetic.h

    r241991 r242235  
    542542};
    543543
    544 template <class OverflowHandler, typename = std::enable_if_t<!std::is_scalar<OverflowHandler>::value>>
     544template <class OverflowHandler, typename = typename std::enable_if<!std::is_scalar<OverflowHandler>::value>::type>
    545545inline constexpr bool observesOverflow() { return true; }
    546546
     
    554554}
    555555
    556 template <class OverflowHandler, typename U, typename V, typename R, typename = std::enable_if_t<!std::is_scalar<OverflowHandler>::value>>
     556template <class OverflowHandler, typename U, typename V, typename R, typename = typename std::enable_if<!std::is_scalar<OverflowHandler>::value>::type>
    557557static inline bool safeAdd(U lhs, V rhs, R& result)
    558558{
     
    568568}
    569569
    570 template <class OverflowHandler, typename U, typename V, typename R, typename = std::enable_if_t<!std::is_scalar<OverflowHandler>::value>>
     570template <class OverflowHandler, typename U, typename V, typename R, typename = typename std::enable_if<!std::is_scalar<OverflowHandler>::value>::type>
    571571static inline bool safeSub(U lhs, V rhs, R& result)
    572572{
     
    582582}
    583583
    584 template <class OverflowHandler, typename U, typename V, typename R, typename = std::enable_if_t<!std::is_scalar<OverflowHandler>::value>>
     584template <class OverflowHandler, typename U, typename V, typename R, typename = typename std::enable_if<!std::is_scalar<OverflowHandler>::value>::type>
    585585static inline bool safeMultiply(U lhs, V rhs, R& result)
    586586{
Note: See TracChangeset for help on using the changeset viewer.