⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 237448 in webkit


Ignore:
Timestamp:
Oct 26, 2018, 1:25:43 AM (8 years ago)
Author:
keith_miller@apple.com
Message:

Some internal projects include wtf headers and build with C++11
​https://bugs.webkit.org/show_bug.cgi?id=190791

Reviewed by Alexey Proskuryakov.

C++11 doesn't support constexpr functions that contain
statements. This patch removes getLSBSet set from builds before
C++14 to avoid this for now.

  • wtf/MathExtras.h:

(getLSBSet):

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r237429 r237448  
     12018-10-26  Keith Miller  <keith_miller@apple.com>
     2
     3        Some internal projects include wtf headers and build with C++11
     4        https://bugs.webkit.org/show_bug.cgi?id=190791
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        C++11 doesn't support constexpr functions that contain
     9        statements. This patch removes getLSBSet set from builds before
     10        C++14 to avoid this for now.
     11
     12        * wtf/MathExtras.h:
     13        (getLSBSet):
     14
    1152018-10-25  Ross Kirsling  <ross.kirsling@sony.com>
    216
  • trunk/Source/WTF/wtf/MathExtras.h

    r237429 r237448  
    207207}
    208208
     209// FIXME: Some Darwin projects shamelessly include WTF headers and don't build with C++14... See: rdar://problem/45395767
     210// Since C++11 and before don't support constexpr statements we can't mark this function constexpr.
     211#if !defined(WTF_CPP_STD_VER) || WTF_CPP_STD_VER >= 14
    209212template <typename T> constexpr unsigned getLSBSet(T value)
    210213{
    … …  
    218221    return result;
    219222}
     223#endif
    220224
    221225template<typename T> inline T divideRoundedUp(T a, T b)
Note: See TracChangeset for help on using the changeset viewer.