Changeset 223617 in webkit


Ignore:
Timestamp:
Oct 18, 2017 11:23:09 AM (7 years ago)
Author:
aestes@apple.com
Message:

Roll out r223316.

Location:
trunk/Source/WTF/wtf
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/wtf/Atomics.h

    r223316 r223617  
    347347}
    348348
    349 template <typename T, std::enable_if_t<sizeof(T) == 8>* = nullptr>
     349template <typename T, typename std::enable_if<sizeof(T) == 8>::type* = nullptr>
    350350ALWAYS_INLINE Dependency dependency(T value)
    351351{
     
    380380// FIXME: This code is almost identical to the other dependency() overload.
    381381// https://bugs.webkit.org/show_bug.cgi?id=169405
    382 template <typename T, std::enable_if_t<sizeof(T) == 4>* = nullptr>
     382template <typename T, typename std::enable_if<sizeof(T) == 4>::type* = nullptr>
    383383ALWAYS_INLINE Dependency dependency(T value)
    384384{
     
    401401}
    402402
    403 template <typename T, std::enable_if_t<sizeof(T) == 2>* = nullptr>
     403template <typename T, typename std::enable_if<sizeof(T) == 2>::type* = nullptr>
    404404ALWAYS_INLINE Dependency dependency(T value)
    405405{
     
    407407}
    408408
    409 template <typename T, std::enable_if_t<sizeof(T) == 1>* = nullptr>
     409template <typename T, typename std::enable_if<sizeof(T) == 1>::type* = nullptr>
    410410ALWAYS_INLINE Dependency dependency(T value)
    411411{
  • trunk/Source/WTF/wtf/CagedUniquePtr.h

    r223316 r223617  
    8080
    8181template<Gigacage::Kind kind, typename T>
    82 class CagedUniquePtr<kind, T[], std::enable_if_t<std::is_trivially_destructible<T>::value>> : public CagedPtr<kind, T> {
     82class CagedUniquePtr<kind, T[], typename std::enable_if<std::is_trivially_destructible<T>::value>::type> : public CagedPtr<kind, T> {
    8383public:
    8484    CagedUniquePtr() : CagedPtr<kind, T>() { }
     
    131131
    132132template<Gigacage::Kind kind, typename T>
    133 class CagedUniquePtr<kind, T[], std::enable_if_t<!std::is_trivially_destructible<T>::value>> : public CagedPtr<kind, T> {
     133class CagedUniquePtr<kind, T[], typename std::enable_if<!std::is_trivially_destructible<T>::value>::type> : public CagedPtr<kind, T> {
    134134public:
    135135    CagedUniquePtr() : CagedPtr<kind, T>() { }
  • trunk/Source/WTF/wtf/CheckedArithmetic.h

    r223316 r223617  
    144144        // When converting value to unsigned Source, value will become a big value if value is negative.
    145145        // Casted value will become bigger than Target::max as Source is bigger than Target.
    146         return static_cast<std::make_unsigned_t<Source>>(value) <= std::numeric_limits<Target>::max();
     146        return static_cast<typename std::make_unsigned<Source>::type>(value) <= std::numeric_limits<Target>::max();
    147147    }
    148148};
  • trunk/Source/WTF/wtf/CompletionHandler.h

    r223316 r223617  
    3838    CompletionHandler() = default;
    3939
    40     template<typename CallableType, class = std::enable_if_t<std::is_rvalue_reference<CallableType&&>::value>>
     40    template<typename CallableType, class = typename std::enable_if<std::is_rvalue_reference<CallableType&&>::value>::type>
    4141    CompletionHandler(CallableType&& callable)
    4242        : m_function(WTFMove(callable))
  • trunk/Source/WTF/wtf/Function.h

    r223316 r223617  
    3939    Function(std::nullptr_t) { }
    4040
    41     template<typename CallableType, class = std::enable_if_t<!(std::is_pointer<CallableType>::value && std::is_function<std::remove_pointer_t<CallableType>>::value) && std::is_rvalue_reference<CallableType&&>::value>>
     41    template<typename CallableType, class = typename std::enable_if<!(std::is_pointer<CallableType>::value && std::is_function<typename std::remove_pointer<CallableType>::type>::value) && std::is_rvalue_reference<CallableType&&>::value>::type>
    4242    Function(CallableType&& callable)
    4343        : m_callableWrapper(std::make_unique<CallableWrapper<CallableType>>(WTFMove(callable)))
     
    4545    }
    4646
    47     template<typename FunctionType, class = std::enable_if_t<std::is_pointer<FunctionType>::value && std::is_function<std::remove_pointer_t<FunctionType>>::value>>
     47    template<typename FunctionType, class = typename std::enable_if<std::is_pointer<FunctionType>::value && std::is_function<typename std::remove_pointer<FunctionType>::type>::value>::type>
    4848    Function(FunctionType f)
    4949        : m_callableWrapper(std::make_unique<CallableWrapper<FunctionType>>(WTFMove(f)))
     
    5959    explicit operator bool() const { return !!m_callableWrapper; }
    6060
    61     template<typename CallableType, class = std::enable_if_t<!(std::is_pointer<CallableType>::value && std::is_function<std::remove_pointer_t<CallableType>>::value) && std::is_rvalue_reference<CallableType&&>::value>>
     61    template<typename CallableType, class = typename std::enable_if<!(std::is_pointer<CallableType>::value && std::is_function<typename std::remove_pointer<CallableType>::type>::value) && std::is_rvalue_reference<CallableType&&>::value>::type>
    6262    Function& operator=(CallableType&& callable)
    6363    {
     
    6666    }
    6767
    68     template<typename FunctionType, class = std::enable_if_t<std::is_pointer<FunctionType>::value && std::is_function<std::remove_pointer_t<FunctionType>>::value>>
     68    template<typename FunctionType, class = typename std::enable_if<std::is_pointer<FunctionType>::value && std::is_function<typename std::remove_pointer<FunctionType>::type>::value>::type>
    6969    Function& operator=(FunctionType f)
    7070    {
  • trunk/Source/WTF/wtf/HashCountedSet.h

    r223317 r223617  
    102102
    103103    // Overloads for smart pointer keys that take the raw pointer type as the parameter.
    104     template<typename V = ValueType> std::enable_if_t<IsSmartPtr<V>::value, iterator> find(typename GetPtrHelper<V>::PtrType);
    105     template<typename V = ValueType> std::enable_if_t<IsSmartPtr<V>::value, const_iterator> find(typename GetPtrHelper<V>::PtrType) const;
    106     template<typename V = ValueType> std::enable_if_t<IsSmartPtr<V>::value, bool> contains(typename GetPtrHelper<V>::PtrType) const;
    107     template<typename V = ValueType> std::enable_if_t<IsSmartPtr<V>::value, unsigned> count(typename GetPtrHelper<V>::PtrType) const;
    108     template<typename V = ValueType> std::enable_if_t<IsSmartPtr<V>::value, bool> remove(typename GetPtrHelper<V>::PtrType);
     104    template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, iterator>::type find(typename GetPtrHelper<V>::PtrType);
     105    template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, const_iterator>::type find(typename GetPtrHelper<V>::PtrType) const;
     106    template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, bool>::type contains(typename GetPtrHelper<V>::PtrType) const;
     107    template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, unsigned>::type count(typename GetPtrHelper<V>::PtrType) const;
     108    template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, bool>::type remove(typename GetPtrHelper<V>::PtrType);
    109109
    110110private:
     
    277277template<typename Value, typename HashFunctions, typename Traits>
    278278template<typename V>
    279 inline auto HashCountedSet<Value, HashFunctions, Traits>::find(typename GetPtrHelper<V>::PtrType value) -> std::enable_if_t<IsSmartPtr<V>::value, iterator>
     279inline auto HashCountedSet<Value, HashFunctions, Traits>::find(typename GetPtrHelper<V>::PtrType value) -> typename std::enable_if<IsSmartPtr<V>::value, iterator>::type
    280280{
    281281    return m_impl.find(value);
     
    284284template<typename Value, typename HashFunctions, typename Traits>
    285285template<typename V>
    286 inline auto HashCountedSet<Value, HashFunctions, Traits>::find(typename GetPtrHelper<V>::PtrType value) const -> std::enable_if_t<IsSmartPtr<V>::value, const_iterator>
     286inline auto HashCountedSet<Value, HashFunctions, Traits>::find(typename GetPtrHelper<V>::PtrType value) const -> typename std::enable_if<IsSmartPtr<V>::value, const_iterator>::type
    287287{
    288288    return m_impl.find(value);
     
    291291template<typename Value, typename HashFunctions, typename Traits>
    292292template<typename V>
    293 inline auto HashCountedSet<Value, HashFunctions, Traits>::contains(typename GetPtrHelper<V>::PtrType value) const -> std::enable_if_t<IsSmartPtr<V>::value, bool>
     293inline auto HashCountedSet<Value, HashFunctions, Traits>::contains(typename GetPtrHelper<V>::PtrType value) const -> typename std::enable_if<IsSmartPtr<V>::value, bool>::type
    294294{
    295295    return m_impl.contains(value);
     
    298298template<typename Value, typename HashFunctions, typename Traits>
    299299template<typename V>
    300 inline auto HashCountedSet<Value, HashFunctions, Traits>::count(typename GetPtrHelper<V>::PtrType value) const -> std::enable_if_t<IsSmartPtr<V>::value, unsigned>
     300inline auto HashCountedSet<Value, HashFunctions, Traits>::count(typename GetPtrHelper<V>::PtrType value) const -> typename std::enable_if<IsSmartPtr<V>::value, unsigned>::type
    301301{
    302302    return m_impl.get(value);
     
    305305template<typename Value, typename HashFunctions, typename Traits>
    306306template<typename V>
    307 inline auto HashCountedSet<Value, HashFunctions, Traits>::remove(typename GetPtrHelper<V>::PtrType value) -> std::enable_if_t<IsSmartPtr<V>::value, bool>
     307inline auto HashCountedSet<Value, HashFunctions, Traits>::remove(typename GetPtrHelper<V>::PtrType value) -> typename std::enable_if<IsSmartPtr<V>::value, bool>::type
    308308{
    309309    return remove(find(value));
  • trunk/Source/WTF/wtf/HashFunctions.h

    r223316 r223617  
    179179    struct TupleHash {
    180180        template<size_t I = 0>
    181         static std::enable_if_t<I < sizeof...(Types) - 1, unsigned> hash(const std::tuple<Types...>& t)
    182         {
    183             using IthTupleElementType = std::tuple_element_t<I, typename std::tuple<Types...>>;
     181        static typename std::enable_if<I < sizeof...(Types) - 1, unsigned>::type hash(const std::tuple<Types...>& t)
     182        {
     183            using IthTupleElementType = typename std::tuple_element<I, typename std::tuple<Types...>>::type;
    184184            return pairIntHash(DefaultHash<IthTupleElementType>::Hash::hash(std::get<I>(t)), hash<I + 1>(t));
    185185        }
    186186
    187187        template<size_t I = 0>
    188         static std::enable_if_t<I == sizeof...(Types) - 1, unsigned> hash(const std::tuple<Types...>& t)
    189         {
    190             using IthTupleElementType = std::tuple_element_t<I, typename std::tuple<Types...>>;
     188        static typename std::enable_if<I == sizeof...(Types) - 1, unsigned>::type hash(const std::tuple<Types...>& t)
     189        {
     190            using IthTupleElementType = typename std::tuple_element<I, typename std::tuple<Types...>>::type;
    191191            return DefaultHash<IthTupleElementType>::Hash::hash(std::get<I>(t));
    192192        }
    193193
    194194        template<size_t I = 0>
    195         static std::enable_if_t<I < sizeof...(Types) - 1, bool> equal(const std::tuple<Types...>& a, const std::tuple<Types...>& b)
    196         {
    197             using IthTupleElementType = std::tuple_element_t<I, typename std::tuple<Types...>>;
     195        static typename std::enable_if<I < sizeof...(Types) - 1, bool>::type equal(const std::tuple<Types...>& a, const std::tuple<Types...>& b)
     196        {
     197            using IthTupleElementType = typename std::tuple_element<I, typename std::tuple<Types...>>::type;
    198198            return DefaultHash<IthTupleElementType>::Hash::equal(std::get<I>(a), std::get<I>(b)) && equal<I + 1>(a, b);
    199199        }
    200200
    201201        template<size_t I = 0>
    202         static std::enable_if_t<I == sizeof...(Types) - 1, bool> equal(const std::tuple<Types...>& a, const std::tuple<Types...>& b)
    203         {
    204             using IthTupleElementType = std::tuple_element_t<I, typename std::tuple<Types...>>;
     202        static typename std::enable_if<I == sizeof...(Types) - 1, bool>::type equal(const std::tuple<Types...>& a, const std::tuple<Types...>& b)
     203        {
     204            using IthTupleElementType = typename std::tuple_element<I, typename std::tuple<Types...>>::type;
    205205            return DefaultHash<IthTupleElementType>::Hash::equal(std::get<I>(a), std::get<I>(b));
    206206        }
  • trunk/Source/WTF/wtf/HashMap.h

    r223316 r223617  
    161161
    162162    // Overloads for smart pointer keys that take the raw pointer type as the parameter.
    163     template<typename K = KeyType> std::enable_if_t<IsSmartPtr<K>::value, iterator> find(typename GetPtrHelper<K>::PtrType);
    164     template<typename K = KeyType> std::enable_if_t<IsSmartPtr<K>::value, const_iterator> find(typename GetPtrHelper<K>::PtrType) const;
    165     template<typename K = KeyType> std::enable_if_t<IsSmartPtr<K>::value, bool> contains(typename GetPtrHelper<K>::PtrType) const;
    166     template<typename K = KeyType> std::enable_if_t<IsSmartPtr<K>::value, MappedPeekType> inlineGet(typename GetPtrHelper<K>::PtrType) const;
    167     template<typename K = KeyType> std::enable_if_t<IsSmartPtr<K>::value, MappedPeekType> get(typename GetPtrHelper<K>::PtrType) const;
    168     template<typename K = KeyType> std::enable_if_t<IsSmartPtr<K>::value, bool> remove(typename GetPtrHelper<K>::PtrType);
    169     template<typename K = KeyType> std::enable_if_t<IsSmartPtr<K>::value, MappedTakeType> take(typename GetPtrHelper<K>::PtrType);
     163    template<typename K = KeyType> typename std::enable_if<IsSmartPtr<K>::value, iterator>::type find(typename GetPtrHelper<K>::PtrType);
     164    template<typename K = KeyType> typename std::enable_if<IsSmartPtr<K>::value, const_iterator>::type find(typename GetPtrHelper<K>::PtrType) const;
     165    template<typename K = KeyType> typename std::enable_if<IsSmartPtr<K>::value, bool>::type contains(typename GetPtrHelper<K>::PtrType) const;
     166    template<typename K = KeyType> typename std::enable_if<IsSmartPtr<K>::value, MappedPeekType>::type inlineGet(typename GetPtrHelper<K>::PtrType) const;
     167    template<typename K = KeyType> typename std::enable_if<IsSmartPtr<K>::value, MappedPeekType>::type get(typename GetPtrHelper<K>::PtrType) const;
     168    template<typename K = KeyType> typename std::enable_if<IsSmartPtr<K>::value, bool>::type remove(typename GetPtrHelper<K>::PtrType);
     169    template<typename K = KeyType> typename std::enable_if<IsSmartPtr<K>::value, MappedTakeType>::type take(typename GetPtrHelper<K>::PtrType);
    170170
    171171    void checkConsistency() const;
     
    474474template<typename T, typename U, typename V, typename W, typename X>
    475475template<typename K>
    476 inline auto HashMap<T, U, V, W, X>::find(typename GetPtrHelper<K>::PtrType key) -> std::enable_if_t<IsSmartPtr<K>::value, iterator>
     476inline auto HashMap<T, U, V, W, X>::find(typename GetPtrHelper<K>::PtrType key) -> typename std::enable_if<IsSmartPtr<K>::value, iterator>::type
    477477{
    478478    return m_impl.template find<HashMapTranslator<KeyValuePairTraits, HashFunctions>>(key);
     
    481481template<typename T, typename U, typename V, typename W, typename X>
    482482template<typename K>
    483 inline auto HashMap<T, U, V, W, X>::find(typename GetPtrHelper<K>::PtrType key) const -> std::enable_if_t<IsSmartPtr<K>::value, const_iterator>
     483inline auto HashMap<T, U, V, W, X>::find(typename GetPtrHelper<K>::PtrType key) const -> typename std::enable_if<IsSmartPtr<K>::value, const_iterator>::type
    484484{
    485485    return m_impl.template find<HashMapTranslator<KeyValuePairTraits, HashFunctions>>(key);
     
    488488template<typename T, typename U, typename V, typename W, typename X>
    489489template<typename K>
    490 inline auto HashMap<T, U, V, W, X>::contains(typename GetPtrHelper<K>::PtrType key) const -> std::enable_if_t<IsSmartPtr<K>::value, bool>
     490inline auto HashMap<T, U, V, W, X>::contains(typename GetPtrHelper<K>::PtrType key) const -> typename std::enable_if<IsSmartPtr<K>::value, bool>::type
    491491{
    492492    return m_impl.template contains<HashMapTranslator<KeyValuePairTraits, HashFunctions>>(key);
     
    495495template<typename T, typename U, typename V, typename W, typename X>
    496496template<typename K>
    497 inline auto HashMap<T, U, V, W, X>::inlineGet(typename GetPtrHelper<K>::PtrType key) const -> std::enable_if_t<IsSmartPtr<K>::value, MappedPeekType>
     497inline auto HashMap<T, U, V, W, X>::inlineGet(typename GetPtrHelper<K>::PtrType key) const -> typename std::enable_if<IsSmartPtr<K>::value, MappedPeekType>::type
    498498{
    499499    KeyValuePairType* entry = const_cast<HashTableType&>(m_impl).template inlineLookup<HashMapTranslator<KeyValuePairTraits, HashFunctions>>(key);
     
    505505template<typename T, typename U, typename V, typename W, typename X>
    506506template<typename K>
    507 auto HashMap<T, U, V, W, X>::get(typename GetPtrHelper<K>::PtrType key) const -> std::enable_if_t<IsSmartPtr<K>::value, MappedPeekType>
     507auto HashMap<T, U, V, W, X>::get(typename GetPtrHelper<K>::PtrType key) const -> typename std::enable_if<IsSmartPtr<K>::value, MappedPeekType>::type
    508508{
    509509    return inlineGet(key);
     
    512512template<typename T, typename U, typename V, typename W, typename X>
    513513template<typename K>
    514 inline auto HashMap<T, U, V, W, X>::remove(typename GetPtrHelper<K>::PtrType key) -> std::enable_if_t<IsSmartPtr<K>::value, bool>
     514inline auto HashMap<T, U, V, W, X>::remove(typename GetPtrHelper<K>::PtrType key) -> typename std::enable_if<IsSmartPtr<K>::value, bool>::type
    515515{
    516516    return remove(find(key));
     
    519519template<typename T, typename U, typename V, typename W, typename X>
    520520template<typename K>
    521 inline auto HashMap<T, U, V, W, X>::take(typename GetPtrHelper<K>::PtrType key) -> std::enable_if_t<IsSmartPtr<K>::value, MappedTakeType>
     521inline auto HashMap<T, U, V, W, X>::take(typename GetPtrHelper<K>::PtrType key) -> typename std::enable_if<IsSmartPtr<K>::value, MappedTakeType>::type
    522522{
    523523    iterator it = find(key);
  • trunk/Source/WTF/wtf/HashSet.h

    r223316 r223617  
    3535    WTF_MAKE_FAST_ALLOCATED;
    3636private:
    37     using HashFunctions = HashArg;
    38     using ValueTraits = TraitsArg;
    39     using TakeType = typename ValueTraits::TakeType;
     37    typedef HashArg HashFunctions;
     38    typedef TraitsArg ValueTraits;
     39    typedef typename ValueTraits::TakeType TakeType;
    4040
    4141public:
    42     using ValueType = typename ValueTraits::TraitType;
     42    typedef typename ValueTraits::TraitType ValueType;
    4343
    4444private:
    45     using HashTableType = HashTable<ValueType, ValueType, IdentityExtractor, HashFunctions, ValueTraits, ValueTraits>;
     45    typedef HashTable<ValueType, ValueType, IdentityExtractor,
     46        HashFunctions, ValueTraits, ValueTraits> HashTableType;
    4647
    4748public:
    48     using iterator = HashTableConstIteratorAdapter<HashTableType, ValueType>;
    49     using const_iterator = HashTableConstIteratorAdapter<HashTableType, ValueType>;
    50     using AddResult= typename HashTableType::AddResult;
     49    typedef HashTableConstIteratorAdapter<HashTableType, ValueType> iterator;
     50    typedef HashTableConstIteratorAdapter<HashTableType, ValueType> const_iterator;
     51    typedef typename HashTableType::AddResult AddResult;
    5152
    5253    HashSet()
     
    113114
    114115    // Overloads for smart pointer values that take the raw pointer type as the parameter.
    115     template<typename V = ValueType> std::enable_if_t<IsSmartPtr<V>::value, iterator> find(typename GetPtrHelper<V>::PtrType) const;
    116     template<typename V = ValueType> std::enable_if_t<IsSmartPtr<V>::value, bool> contains(typename GetPtrHelper<V>::PtrType) const;
    117     template<typename V = ValueType> std::enable_if_t<IsSmartPtr<V>::value, bool> remove(typename GetPtrHelper<V>::PtrType);
    118     template<typename V = ValueType> std::enable_if_t<IsSmartPtr<V>::value, TakeType> take(typename GetPtrHelper<V>::PtrType);
     116    template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, iterator>::type find(typename GetPtrHelper<V>::PtrType) const;
     117    template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, bool>::type contains(typename GetPtrHelper<V>::PtrType) const;
     118    template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, bool>::type remove(typename GetPtrHelper<V>::PtrType);
     119    template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, TakeType>::type take(typename GetPtrHelper<V>::PtrType);
    119120
    120121    static bool isValidValue(const ValueType&);
     
    311312template<typename Value, typename HashFunctions, typename Traits>
    312313template<typename V>
    313 inline auto HashSet<Value, HashFunctions, Traits>::find(typename GetPtrHelper<V>::PtrType value) const -> std::enable_if_t<IsSmartPtr<V>::value, iterator>
     314inline auto HashSet<Value, HashFunctions, Traits>::find(typename GetPtrHelper<V>::PtrType value) const -> typename std::enable_if<IsSmartPtr<V>::value, iterator>::type
    314315{
    315316    return m_impl.template find<HashSetTranslator<Traits, HashFunctions>>(value);
     
    318319template<typename Value, typename HashFunctions, typename Traits>
    319320template<typename V>
    320 inline auto HashSet<Value, HashFunctions, Traits>::contains(typename GetPtrHelper<V>::PtrType value) const -> std::enable_if_t<IsSmartPtr<V>::value, bool>
     321inline auto HashSet<Value, HashFunctions, Traits>::contains(typename GetPtrHelper<V>::PtrType value) const -> typename std::enable_if<IsSmartPtr<V>::value, bool>::type
    321322{
    322323    return m_impl.template contains<HashSetTranslator<Traits, HashFunctions>>(value);
     
    325326template<typename Value, typename HashFunctions, typename Traits>
    326327template<typename V>
    327 inline auto HashSet<Value, HashFunctions, Traits>::remove(typename GetPtrHelper<V>::PtrType value) -> std::enable_if_t<IsSmartPtr<V>::value, bool>
     328inline auto HashSet<Value, HashFunctions, Traits>::remove(typename GetPtrHelper<V>::PtrType value) -> typename std::enable_if<IsSmartPtr<V>::value, bool>::type
    328329{
    329330    return remove(find(value));
     
    332333template<typename Value, typename HashFunctions, typename Traits>
    333334template<typename V>
    334 inline auto HashSet<Value, HashFunctions, Traits>::take(typename GetPtrHelper<V>::PtrType value) -> std::enable_if_t<IsSmartPtr<V>::value, TakeType>
     335inline auto HashSet<Value, HashFunctions, Traits>::take(typename GetPtrHelper<V>::PtrType value) -> typename std::enable_if<IsSmartPtr<V>::value, TakeType>::type
    335336{
    336337    return take(find(value));
  • trunk/Source/WTF/wtf/HashTable.h

    r223316 r223617  
    106106    class HashTableConstIterator : public std::iterator<std::forward_iterator_tag, Value, std::ptrdiff_t, const Value*, const Value&> {
    107107    private:
    108         using HashTableType = HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>;
    109         using iterator = HashTableIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>;
    110         using const_iterator = HashTableConstIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>;
    111         using ValueType = Value;
    112         using ReferenceType = const ValueType&;
    113         using PointerType = const ValueType*;
     108        typedef HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits> HashTableType;
     109        typedef HashTableIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits> iterator;
     110        typedef HashTableConstIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits> const_iterator;
     111        typedef Value ValueType;
     112        typedef const ValueType& ReferenceType;
     113        typedef const ValueType* PointerType;
    114114
    115115        friend class HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>;
     
    242242    class HashTableIterator : public std::iterator<std::forward_iterator_tag, Value, std::ptrdiff_t, Value*, Value&> {
    243243    private:
    244         using HashTableType = HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>;
    245         using iterator = HashTableIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>;
    246         using const_iterator = HashTableConstIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>;
    247         using ValueType = Value;
    248         using ReferenceType = ValueType&;
    249         using PointerType = ValueType*;
     244        typedef HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits> HashTableType;
     245        typedef HashTableIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits> iterator;
     246        typedef HashTableConstIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits> const_iterator;
     247        typedef Value ValueType;
     248        typedef ValueType& ReferenceType;
     249        typedef ValueType* PointerType;
    250250
    251251        friend class HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>;
     
    301301    class HashTable {
    302302    public:
    303         using iterator = HashTableIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>;
    304         using const_iterator = HashTableConstIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>;
    305         using ValueTraits = Traits;
    306         using KeyType = Key;
    307         using ValueType = Value;
    308         using IdentityTranslatorType = IdentityHashTranslator<ValueTraits, HashFunctions>;
    309         using AddResult = HashTableAddResult<iterator>;
     303        typedef HashTableIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits> iterator;
     304        typedef HashTableConstIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits> const_iterator;
     305        typedef Traits ValueTraits;
     306        typedef Key KeyType;
     307        typedef Value ValueType;
     308        typedef IdentityHashTranslator<ValueTraits, HashFunctions> IdentityTranslatorType;
     309        typedef HashTableAddResult<iterator> AddResult;
    310310
    311311#if DUMP_HASHTABLE_STATS_PER_TABLE
     
    434434        static void deallocateTable(ValueType* table, unsigned size);
    435435
    436         using LookupType = std::pair<ValueType*, bool>;
    437         using FullLookupType = std::pair<LookupType, unsigned>;
     436        typedef std::pair<ValueType*, bool> LookupType;
     437        typedef std::pair<LookupType, unsigned> FullLookupType;
    438438
    439439        LookupType lookupForWriting(const Key& key) { return lookupForWriting<IdentityTranslatorType>(key); };
     
    586586            return;
    587587        ASSERT(!HashTranslator::equal(KeyTraits::emptyValue(), key));
    588         std::aligned_storage_t<sizeof(ValueType), std::alignment_of<ValueType>::value> deletedValueBuffer;
     588        typename std::aligned_storage<sizeof(ValueType), std::alignment_of<ValueType>::value>::type deletedValueBuffer;
    589589        ValueType* deletedValuePtr = reinterpret_cast_ptr<ValueType*>(&deletedValueBuffer);
    590590        ValueType& deletedValue = *deletedValuePtr;
  • trunk/Source/WTF/wtf/HashTraits.h

    r223316 r223617  
    106106// Can be used with strong enums, allows zero as key.
    107107template<typename T> struct StrongEnumHashTraits : GenericHashTraits<T> {
    108     using UnderlyingType = std::underlying_type_t<T>;
     108    using UnderlyingType = typename std::underlying_type<T>::type;
    109109    static const bool emptyValueIsZero = false;
    110110    static T emptyValue() { return static_cast<T>(std::numeric_limits<UnderlyingType>::max()); }
     
    225225
    226226template<typename Traits, typename T>
    227 auto hashTraitsDeleteBucket(T& value) -> std::enable_if_t<HashTraitHasCustomDelete<Traits, T>::value>
     227typename std::enable_if<HashTraitHasCustomDelete<Traits, T>::value>::type
     228hashTraitsDeleteBucket(T& value)
    228229{
    229230    Traits::customDeleteBucket(value);
     
    231232
    232233template<typename Traits, typename T>
    233 auto hashTraitsDeleteBucket(T& value) -> std::enable_if_t<!HashTraitHasCustomDelete<Traits, T>::value>
     234typename std::enable_if<!HashTraitHasCustomDelete<Traits, T>::value>::type
     235hashTraitsDeleteBucket(T& value)
    234236{
    235237    value.~T();
  • trunk/Source/WTF/wtf/IndexedContainerIterator.h

    r223316 r223617  
    4545    }
    4646
    47     auto operator*() -> std::result_of_t<decltype(&Container::at)(const Container, unsigned)>
     47    auto operator*() -> typename std::result_of<decltype(&Container::at)(const Container, unsigned)>::type
    4848    {
    4949        return m_container->at(m_index);
  • trunk/Source/WTF/wtf/IteratorAdaptors.h

    r223316 r223617  
    5353    }
    5454
    55     const std::remove_const_t<decltype(*std::declval<Iterator>())> operator*() const
     55    const typename std::remove_const<decltype(*std::declval<Iterator>())>::type operator*() const
    5656    {
    5757        ASSERT(m_iter != m_end);
     
    9090    }
    9191
    92     const std::remove_const_t<decltype(std::declval<Transform>()(*std::declval<Iterator>()))> operator*() const
     92    const typename std::remove_const<decltype(std::declval<Transform>()(*std::declval<Iterator>()))>::type operator*() const
    9393    {
    9494        return m_transform(*m_iter);
  • trunk/Source/WTF/wtf/KeyValuePair.h

    r223316 r223617  
    5858
    5959template<typename K, typename V>
    60 inline KeyValuePair<std::decay_t<K>, std::decay_t<V>> makeKeyValuePair(K&& key, V&& value)
     60inline KeyValuePair<typename std::decay<K>::type, typename std::decay<V>::type> makeKeyValuePair(K&& key, V&& value)
    6161{
    62     return KeyValuePair<std::decay_t<K>, std::decay_t<V>> { std::forward<K>(key), std::forward<V>(value) };
     62    return KeyValuePair<typename std::decay<K>::type, typename std::decay<V>::type> { std::forward<K>(key), std::forward<V>(value) };
    6363}
    6464
  • trunk/Source/WTF/wtf/LEBDecoder.h

    r223316 r223617  
    8080    }
    8181
    82     using UnsignedT = std::make_unsigned_t<T>;
     82    using UnsignedT = typename std::make_unsigned<T>::type;
    8383    if (shift < numBits && (byte & 0x40))
    8484        result = static_cast<T>(static_cast<UnsignedT>(result) | (static_cast<UnsignedT>(-1) << shift));
  • trunk/Source/WTF/wtf/ListHashSet.h

    r223316 r223617  
    4949    WTF_MAKE_FAST_ALLOCATED;
    5050private:
    51     using Node = ListHashSetNode<ValueArg>;
    52 
    53     using NodeTraits = HashTraits<Node*>;
    54     using NodeHash = ListHashSetNodeHashFunctions<HashArg>;
    55     using BaseTranslator = ListHashSetTranslator<HashArg>;
    56 
    57     using HashFunctions = HashArg;
     51    typedef ListHashSetNode<ValueArg> Node;
     52
     53    typedef HashTraits<Node*> NodeTraits;
     54    typedef ListHashSetNodeHashFunctions<HashArg> NodeHash;
     55    typedef ListHashSetTranslator<HashArg> BaseTranslator;
     56
     57    typedef HashArg HashFunctions;
    5858
    5959public:
    60     using ValueType = ValueArg;
    61 
    62     using iterator = ListHashSetIterator<ValueType, HashArg>;
    63     using const_iterator = ListHashSetConstIterator<ValueType, HashArg>;
     60    typedef ValueArg ValueType;
     61
     62    typedef ListHashSetIterator<ValueType, HashArg> iterator;
     63    typedef ListHashSetConstIterator<ValueType, HashArg> const_iterator;
    6464    friend class ListHashSetConstIterator<ValueType, HashArg>;
    6565
    66     using reverse_iterator = std::reverse_iterator<iterator>;
    67     using const_reverse_iterator = std::reverse_iterator<const_iterator>;
    68 
    69     using AddResult = HashTableAddResult<iterator>;
     66    typedef std::reverse_iterator<iterator> reverse_iterator;
     67    typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
     68
     69    typedef HashTableAddResult<iterator> AddResult;
    7070
    7171    ListHashSet() = default;
     
    178178template<typename ValueArg, typename HashArg> class ListHashSetIterator {
    179179private:
    180     using ListHashSetType = ListHashSet<ValueArg, HashArg>;
    181     using iterator = ListHashSetIterator<ValueArg, HashArg>;
    182     using const_iterator = ListHashSetConstIterator<ValueArg, HashArg>;
    183     using Node = ListHashSetNode<ValueArg>;
    184     using ValueType = ValueArg;
     180    typedef ListHashSet<ValueArg, HashArg> ListHashSetType;
     181    typedef ListHashSetIterator<ValueArg, HashArg> iterator;
     182    typedef ListHashSetConstIterator<ValueArg, HashArg> const_iterator;
     183    typedef ListHashSetNode<ValueArg> Node;
     184    typedef ValueArg ValueType;
    185185
    186186    friend class ListHashSet<ValueArg, HashArg>;
     
    189189
    190190public:
    191     using difference_type = ptrdiff_t;
    192     using value_type = ValueType;
    193     using pointer = ValueType*;
    194     using reference = ValueType&;
    195     using iterator_category = std::bidirectional_iterator_tag;
     191    typedef ptrdiff_t difference_type;
     192    typedef ValueType value_type;
     193    typedef ValueType* pointer;
     194    typedef ValueType& reference;
     195    typedef std::bidirectional_iterator_tag iterator_category;
    196196
    197197    ListHashSetIterator() { }
     
    225225template<typename ValueArg, typename HashArg> class ListHashSetConstIterator {
    226226private:
    227     using ListHashSetType = ListHashSet<ValueArg, HashArg>;
    228     using iterator = ListHashSetIterator<ValueArg, HashArg>;
    229     using const_iterator = ListHashSetConstIterator<ValueArg, HashArg>;
    230     using Node = ListHashSetNode<ValueArg>;
    231     using ValueType = ValueArg;
     227    typedef ListHashSet<ValueArg, HashArg> ListHashSetType;
     228    typedef ListHashSetIterator<ValueArg, HashArg> iterator;
     229    typedef ListHashSetConstIterator<ValueArg, HashArg> const_iterator;
     230    typedef ListHashSetNode<ValueArg> Node;
     231    typedef ValueArg ValueType;
    232232
    233233    friend class ListHashSet<ValueArg, HashArg>;
     
    241241
    242242public:
    243     using difference_type = ptrdiff_t;
    244     using value_type = const ValueType;
    245     using pointer = const ValueType*;
    246     using reference = const ValueType&;
    247     using iterator_category = std::bidirectional_iterator_tag;
     243    typedef ptrdiff_t difference_type;
     244    typedef const ValueType value_type;
     245    typedef const ValueType* pointer;
     246    typedef const ValueType& reference;
     247    typedef std::bidirectional_iterator_tag iterator_category;
    248248
    249249    ListHashSetConstIterator()
  • trunk/Source/WTF/wtf/MathExtras.h

    r223316 r223617  
    210210template <typename T> inline unsigned getLSBSet(T value)
    211211{
    212     typedef std::make_unsigned_t<T> UnsignedT;
     212    typedef typename std::make_unsigned<T>::type UnsignedT;
    213213    unsigned result = 0;
    214214
     
    374374
    375375template <typename T>
    376 inline std::enable_if_t<std::is_floating_point<T>::value, T> safeFPDivision(T u, T v)
     376inline typename std::enable_if<std::is_floating_point<T>::value, T>::type safeFPDivision(T u, T v)
    377377{
    378378    // Protect against overflow / underflow.
     
    391391// [2] http://www.boost.org/doc/libs/1_34_0/libs/test/doc/components/test_tools/floating_point_comparison.html
    392392template <typename T>
    393 inline std::enable_if_t<std::is_floating_point<T>::value, bool> areEssentiallyEqual(T u, T v, T epsilon = std::numeric_limits<T>::epsilon())
     393inline typename std::enable_if<std::is_floating_point<T>::value, bool>::type areEssentiallyEqual(T u, T v, T epsilon = std::numeric_limits<T>::epsilon())
    394394{
    395395    if (u == v)
     
    402402// Match behavior of Math.min, where NaN is returned if either argument is NaN.
    403403template <typename T>
    404 inline std::enable_if_t<std::is_floating_point<T>::value, T> nanPropagatingMin(T a, T b)
     404inline typename std::enable_if<std::is_floating_point<T>::value, T>::type nanPropagatingMin(T a, T b)
    405405{
    406406    return std::isnan(a) || std::isnan(b) ? std::numeric_limits<T>::quiet_NaN() : std::min(a, b);
     
    409409// Match behavior of Math.max, where NaN is returned if either argument is NaN.
    410410template <typename T>
    411 inline std::enable_if_t<std::is_floating_point<T>::value, T> nanPropagatingMax(T a, T b)
     411inline typename std::enable_if<std::is_floating_point<T>::value, T>::type nanPropagatingMax(T a, T b)
    412412{
    413413    return std::isnan(a) || std::isnan(b) ? std::numeric_limits<T>::quiet_NaN() : std::max(a, b);
  • trunk/Source/WTF/wtf/NeverDestroyed.h

    r223316 r223617  
    6363
    6464private:
    65     using PointerType = std::remove_const_t<T>*;
     65    using PointerType = typename std::remove_const<T>::type*;
    6666
    6767    PointerType storagePointer() const { return const_cast<PointerType>(reinterpret_cast<const T*>(&m_storage)); }
     
    6969    // FIXME: Investigate whether we should allocate a hunk of virtual memory
    7070    // and hand out chunks of it to NeverDestroyed instead, to reduce fragmentation.
    71     std::aligned_storage_t<sizeof(T), std::alignment_of<T>::value> m_storage;
     71    typename std::aligned_storage<sizeof(T), std::alignment_of<T>::value>::type m_storage;
    7272
    7373    template<typename PtrType, bool ShouldRelax = std::is_base_of<RefCountedBase, PtrType>::value> struct MaybeRelax {
     
    117117
    118118private:
    119     using PointerType = std::remove_const_t<T>*;
     119    using PointerType = typename std::remove_const<T>::type*;
    120120
    121121    PointerType storagePointer() const
     
    127127    // FIXME: Investigate whether we should allocate a hunk of virtual memory
    128128    // and hand out chunks of it to NeverDestroyed instead, to reduce fragmentation.
    129     std::aligned_storage_t<sizeof(T), std::alignment_of<T>::value> m_storage;
     129    typename std::aligned_storage<sizeof(T), std::alignment_of<T>::value>::type m_storage;
    130130
    131131    template<typename PtrType, bool ShouldRelax = std::is_base_of<RefCountedBase, PtrType>::value> struct MaybeRelax {
  • trunk/Source/WTF/wtf/OptionSet.h

    r223316 r223617  
    3939template<typename T> class OptionSet {
    4040    static_assert(std::is_enum<T>::value, "T is not an enum type");
    41     using StorageType = std::make_unsigned_t<std::underlying_type_t<T>>;
     41    typedef typename std::make_unsigned<typename std::underlying_type<T>::type>::type StorageType;
    4242
    4343public:
  • trunk/Source/WTF/wtf/RetainPtr.h

    r223316 r223617  
    5858template<typename T> class RetainPtr {
    5959public:
    60     typedef std::remove_pointer_t<T> ValueType;
     60    typedef typename std::remove_pointer<T>::type ValueType;
    6161    typedef ValueType* PtrType;
    6262    typedef CFTypeRef StorageType;
     
    114114#if defined (__OBJC__) && __has_feature(objc_arc)
    115115    template<typename U>
    116     auto fromStorageTypeHelper(StorageType ptr) const -> std::enable_if_t<std::is_convertible<U, id>::value, PtrType>
     116    typename std::enable_if<std::is_convertible<U, id>::value, PtrType>::type
     117    fromStorageTypeHelper(StorageType ptr) const
    117118    {
    118119        return (__bridge PtrType)ptr;
     
    120121
    121122    template<typename U>
    122     auto fromStorageTypeHelper(StorageType ptr) const -> std::enable_if_t<!std::is_convertible<U, id>::value, PtrType>
     123    typename std::enable_if<!std::is_convertible<U, id>::value, PtrType>::type
     124    fromStorageTypeHelper(StorageType ptr) const
    123125    {
    124126        return (PtrType)ptr;
  • trunk/Source/WTF/wtf/SizeLimits.cpp

    r223316 r223617  
    7171struct SameSizeAsVectorWithInlineCapacity {
    7272    SameSizeAsVectorWithInlineCapacity<T, 0> baseCapacity;
    73     std::aligned_storage_t<sizeof(T), std::alignment_of<T>::value> inlineBuffer[inlineCapacity];
     73    typename std::aligned_storage<sizeof(T), std::alignment_of<T>::value>::type inlineBuffer[inlineCapacity];
    7474};
    7575
  • trunk/Source/WTF/wtf/StdLibExtras.h

    r223316 r223617  
    149149    static_assert(__is_trivially_copyable(FromType), "bitwise_cast of non-trivially-copyable type!");
    150150#endif
    151     std::remove_const_t<ToType> to { };
     151    typename std::remove_const<ToType>::type to { };
    152152    std::memcpy(&to, &from, sizeof(to));
    153153    return to;
     
    403403        static std::false_type test(void*);
    404404
    405         static constexpr const bool value = decltype(test(std::declval<std::remove_cv_t<Derived>*>()))::value;
     405        static constexpr const bool value = decltype(test(std::declval<typename std::remove_cv<Derived>::type*>()))::value;
    406406    };
    407407}
     
    412412template <class T>
    413413struct RemoveCVAndReference  {
    414     typedef std::remove_cv_t<std::remove_reference_t<T>> type;
     414    typedef typename std::remove_cv<typename std::remove_reference<T>::type>::type type;
    415415};
    416416
     
    488488make_unique(size_t n)
    489489{
    490     typedef remove_extent_t<T> U;
     490    typedef typename remove_extent<T>::type U;
    491491    return unique_ptr<T>(new U[n]());
    492492}
     
    507507
    508508template<WTF::CheckMoveParameterTag, typename T>
    509 ALWAYS_INLINE constexpr remove_reference_t<T>&& move(T&& value)
     509ALWAYS_INLINE constexpr typename remove_reference<T>::type&& move(T&& value)
    510510{
    511511    static_assert(is_lvalue_reference<T>::value, "T is not an lvalue reference; move() is unnecessary.");
    512512
    513     using NonRefQualifiedType = remove_reference_t<T>;
     513    using NonRefQualifiedType = typename remove_reference<T>::type;
    514514    static_assert(!is_const<NonRefQualifiedType>::value, "T is const qualified.");
    515515
  • trunk/Source/WTF/wtf/SystemFree.h

    r223316 r223617  
    3434    void operator()(T* pointer) const
    3535    {
    36         free(const_cast<std::remove_cv_t<T>*>(pointer));
     36        free(const_cast<typename std::remove_cv<T>::type*>(pointer));
    3737    }
    3838};
     
    4242    void operator()(T* pointer) const
    4343    {
    44         free(const_cast<std::remove_cv_t<T>*>(pointer));
     44        free(const_cast<typename std::remove_cv<T>::type*>(pointer));
    4545    }
    4646
  • trunk/Source/WTF/wtf/ThreadSpecific.h

    r223316 r223617  
    9494        WTF_MAKE_FAST_ALLOCATED;
    9595    public:
    96         using PointerType = std::remove_const_t<T>*;
     96        using PointerType = typename std::remove_const<T>::type*;
    9797
    9898        Data(ThreadSpecific<T, canBeGCThread>* owner)
     
    113113        PointerType storagePointer() const { return const_cast<PointerType>(reinterpret_cast<const T*>(&m_storage)); }
    114114
    115         std::aligned_storage_t<sizeof(T), std::alignment_of<T>::value> m_storage;
     115        typename std::aligned_storage<sizeof(T), std::alignment_of<T>::value>::type m_storage;
    116116        ThreadSpecific<T, canBeGCThread>* owner;
    117117    };
  • trunk/Source/WTF/wtf/TypeCasts.h

    r223316 r223617  
    7070template <typename Reference, typename T>
    7171struct match_constness {
    72     typedef std::conditional_t<std::is_const<Reference>::value, std::add_const_t<T>, std::remove_const_t<T>> type;
     72    typedef typename std::conditional<std::is_const<Reference>::value, typename std::add_const<T>::type, typename std::remove_const<T>::type>::type type;
    7373};
    74 
    75 template <typename Reference, typename T> using match_constness_t = typename match_constness<Reference, T>::type;
    7674
    7775// Safe downcasting functions.
    7876template<typename Target, typename Source>
    79 inline match_constness_t<Source, Target>& downcast(Source& source)
     77inline typename match_constness<Source, Target>::type& downcast(Source& source)
    8078{
    8179    static_assert(!std::is_same<Source, Target>::value, "Unnecessary cast to same type");
    8280    static_assert(std::is_base_of<Source, Target>::value, "Should be a downcast");
    8381    ASSERT_WITH_SECURITY_IMPLICATION(is<Target>(source));
    84     return static_cast<match_constness_t<Source, Target>&>(source);
     82    return static_cast<typename match_constness<Source, Target>::type&>(source);
    8583}
    8684template<typename Target, typename Source>
    87 inline match_constness_t<Source, Target>* downcast(Source* source)
     85inline typename match_constness<Source, Target>::type* downcast(Source* source)
    8886{
    8987    static_assert(!std::is_same<Source, Target>::value, "Unnecessary cast to same type");
    9088    static_assert(std::is_base_of<Source, Target>::value, "Should be a downcast");
    9189    ASSERT_WITH_SECURITY_IMPLICATION(!source || is<Target>(*source));
    92     return static_cast<match_constness_t<Source, Target>*>(source);
     90    return static_cast<typename match_constness<Source, Target>::type*>(source);
    9391}
    9492
  • trunk/Source/WTF/wtf/Vector.h

    r223316 r223617  
    564564    static const size_t asanInlineBufferAlignment = std::alignment_of<T>::value >= 8 ? std::alignment_of<T>::value : 8;
    565565    static const size_t asanAdjustedInlineCapacity = ((sizeof(T) * inlineCapacity + 7) & ~7) / sizeof(T);
    566     std::aligned_storage_t<sizeof(T), asanInlineBufferAlignment> m_inlineBuffer[asanAdjustedInlineCapacity];
     566    typename std::aligned_storage<sizeof(T), asanInlineBufferAlignment>::type m_inlineBuffer[asanAdjustedInlineCapacity];
    567567#else
    568     std::aligned_storage_t<sizeof(T), std::alignment_of<T>::value> m_inlineBuffer[inlineCapacity];
     568    typename std::aligned_storage<sizeof(T), std::alignment_of<T>::value>::type m_inlineBuffer[inlineCapacity];
    569569#endif
    570570};
     
    796796    void checkConsistency();
    797797
    798     template<typename MapFunction, typename R = std::result_of_t<MapFunction(const T&)>> Vector<R> map(MapFunction) const;
     798    template<typename MapFunction, typename R = typename std::result_of<MapFunction(const T&)>::type> Vector<R> map(MapFunction) const;
    799799
    800800private:
     
    13061306    ASSERT(size() == capacity());
    13071307
    1308     auto ptr = const_cast<std::remove_const_t<std::remove_reference_t<U>>*>(std::addressof(value));
     1308    auto ptr = const_cast<typename std::remove_const<typename std::remove_reference<U>::type>::type*>(std::addressof(value));
    13091309    ptr = expandCapacity(size() + 1, ptr);
    13101310    ASSERT(begin());
     
    13921392    ASSERT_WITH_SECURITY_IMPLICATION(position <= size());
    13931393
    1394     auto ptr = const_cast<std::remove_const_t<std::remove_reference_t<U>>*>(std::addressof(value));
     1394    auto ptr = const_cast<typename std::remove_const<typename std::remove_reference<U>::type>::type*>(std::addressof(value));
    13951395    if (size() == capacity()) {
    13961396        ptr = expandCapacity(size() + 1, ptr);
     
    15921592template<typename SourceType>
    15931593struct CollectionInspector {
    1594     using RealSourceType = std::remove_reference_t<SourceType>;
     1594    using RealSourceType = typename std::remove_reference<SourceType>::type;
    15951595    using IteratorType = decltype(std::begin(std::declval<RealSourceType>()));
    15961596    using SourceItemType = typename std::iterator_traits<IteratorType>::value_type;
     
    16001600struct Mapper {
    16011601    using SourceItemType = typename CollectionInspector<SourceType>::SourceItemType;
    1602     using DestinationItemType = std::result_of_t<MapFunction(SourceItemType&)>;
     1602    using DestinationItemType = typename std::result_of<MapFunction(SourceItemType&)>::type;
    16031603
    16041604    static Vector<DestinationItemType> map(SourceType source, const MapFunction& mapFunction)
     
    16141614
    16151615template<typename MapFunction, typename SourceType>
    1616 struct Mapper<MapFunction, SourceType, std::enable_if_t<std::is_rvalue_reference<SourceType&&>::value>> {
     1616struct Mapper<MapFunction, SourceType, typename std::enable_if<std::is_rvalue_reference<SourceType&&>::value>::type> {
    16171617    using SourceItemType = typename CollectionInspector<SourceType>::SourceItemType;
    1618     using DestinationItemType = std::result_of_t<MapFunction(SourceItemType&&)>;
     1618    using DestinationItemType = typename std::result_of<MapFunction(SourceItemType&&)>::type;
    16191619
    16201620    static Vector<DestinationItemType> map(SourceType&& source, const MapFunction& mapFunction)
     
    16541654template<typename Collection>
    16551655struct CopyToVectorResult {
    1656     using Type = std::remove_cv_t<typename CollectionInspector<Collection>::SourceItemType>;
     1656    using Type = typename std::remove_cv<typename CollectionInspector<Collection>::SourceItemType>::type;
    16571657};
    16581658
  • trunk/Source/WTF/wtf/text/IntegerToStringConversion.h

    r223316 r223617  
    5454{
    5555    if (number < 0)
    56         return numberToStringImpl<T, std::make_unsigned_t<SignedIntegerType>, NegativeNumber>(-number, additionalArgument);
    57     return numberToStringImpl<T, std::make_unsigned_t<SignedIntegerType>, PositiveNumber>(number, additionalArgument);
     56        return numberToStringImpl<T, typename std::make_unsigned<SignedIntegerType>::type, NegativeNumber>(-number, additionalArgument);
     57    return numberToStringImpl<T, typename std::make_unsigned<SignedIntegerType>::type, PositiveNumber>(number, additionalArgument);
    5858}
    5959
     
    8888{
    8989    if (number < 0)
    90         return writeNumberToBufferImpl<CharacterType, std::make_unsigned_t<SignedIntegerType>, NegativeNumber>(-number, destination);
    91     return writeNumberToBufferImpl<CharacterType, std::make_unsigned_t<SignedIntegerType>, PositiveNumber>(number, destination);
     90        return writeNumberToBufferImpl<CharacterType, typename std::make_unsigned<SignedIntegerType>::type, NegativeNumber>(-number, destination);
     91    return writeNumberToBufferImpl<CharacterType, typename std::make_unsigned<SignedIntegerType>::type, PositiveNumber>(number, destination);
    9292}
    9393
     
    119119{
    120120    if (number < 0)
    121         return lengthOfNumberAsStringImpl<std::make_unsigned_t<SignedIntegerType>, NegativeNumber>(-number);
    122     return lengthOfNumberAsStringImpl<std::make_unsigned_t<SignedIntegerType>, PositiveNumber>(number);
     121        return lengthOfNumberAsStringImpl<typename std::make_unsigned<SignedIntegerType>::type, NegativeNumber>(-number);
     122    return lengthOfNumberAsStringImpl<typename std::make_unsigned<SignedIntegerType>::type, PositiveNumber>(number);
    123123}
    124124
Note: See TracChangeset for help on using the changeset viewer.