Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset ca32d45 in mainline


Ignore:
Timestamp:
2018-07-05T21:41:22Z (2 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
master
Children:
0a41449
Parents:
55540fca
git-author:
Dzejrou <dzejrou@…> (2018-05-03 21:44:59)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:22)
Message:

cpp: added missing uses_allocator metafunction and deleted redundant (and wrong) forward declaration of uses_allocator in the tuple header

Location:
uspace/lib/cpp/include/impl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/impl/memory.hpp

    r55540fca rca32d45  
    6262
    6363    /**
     64     * 20.7.7, uses_allocator:
     65     */
     66
     67    namespace aux
     68    {
     69        template<class T, class = void>
     70        struct has_allocator_type: false_type
     71        { /* DUMMY BODY */ };
     72
     73        template<class T>
     74        struct has_allocator_type<T, void_t<typename T::allocator_type>>
     75            : true_type
     76        { /* DUMMY BODY */ };
     77    }
     78
     79    template<class T, class Alloc, class = void>
     80    struct uses_allocator
     81        : aux::value_is<
     82        bool, aux::has_allocator_type<T>::value && is_convertible_v<
     83            Alloc, typename T::allocator_type
     84        >
     85    >
     86    { /* DUMMY BODY */ };
     87
     88    /**
    6489     * 20.7.8, allocator traits:
    6590     */
  • uspace/lib/cpp/include/impl/tuple.hpp

    r55540fca rca32d45  
    463463     */
    464464
    465     template<class...>
    466     struct uses_allocator;
    467 
    468465    template<class... Ts, class Alloc>
    469466    struct uses_allocator<tuple<Ts...>, Alloc>: true_type
Note: See TracChangeset for help on using the changeset viewer.