Changeset 40f8328 in mainline


Ignore:
Timestamp:
2018-07-05T21:41:17Z (6 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2d72b26
Parents:
529ebfb8
git-author:
Jaroslav Jindrak <dzejrou@…> (2017-10-15 18:20:40)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:17)
Message:

cpp: added an auxiliary header for metafunctions, implemented some new type traits, modified void_t to conform C++17 its signature

Location:
uspace/lib/cpp/include
Files:
1 added
2 edited

Legend:

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

    r529ebfb8 r40f8328  
    3232#include <cstdlib>
    3333#include <cstddef>
     34#include <internal/aux.hpp>
    3435
    3536namespace std
     
    607608    struct alignment_of;
    608609
    609     template<class T>
    610     struct rank;
     610    template<class>
     611    struct rank : aux::value_is<size_t, 0u>
     612    { /* DUMMY BODY */ };
     613
     614    template<class T, size_t N>
     615    struct rank<T[N]>: aux::value_is<size_t, 1u + rank<T>::value>
     616    { /* DUMMY BODY */ };
     617
     618    template<class T>
     619    struct rank<T[]>: aux::value_is<size_t, 1u + rank<T>::value>
     620    { /* DUMMY BODY */ };
    611621
    612622    template<class T, unsigned I = 0>
     
    636646
    637647    template<class T>
    638     struct remove_const;
     648    struct remove_const: aux::type_is<T>
     649    { /* DUMMY BODY */ };
     650
     651    template<class T>
     652    struct remove_const<T const>: aux::type_is<T>
     653    { /* DUMMY BODY */ };
    639654
    640655    template<class T>
     
    797812    using result_of_t = typename result_of<T>::type;
    798813
    799     template<class T>
     814    template<class...>
    800815    using void_t = void;
    801816}
  • uspace/lib/cpp/include/impl/typeinfo.hpp

    r529ebfb8 r40f8328  
    3737class type_info
    3838{
    39         public:
     39    public:
    4040        virtual ~type_info();
    4141
Note: See TracChangeset for help on using the changeset viewer.