Changeset 8830faa in mainline


Ignore:
Timestamp:
2018-07-05T21:41:22Z (6 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2cb7f53
Parents:
89bc6460
git-author:
Dzejrou <dzejrou@…> (2018-04-29 20:21:15)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:22)
Message:

cpp: added a way to check if a functor is transparent

File:
1 edited

Legend:

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

    r89bc6460 r8830faa  
    260260         */
    261261        struct transparent_t;
     262
     263        template<class T, class = void>
     264        struct is_transparent: false_type
     265        { /* DUMMY BODY */ };
     266
     267        template<class T>
     268        struct is_transparent<T, void_t<typename T::is_transparent>>
     269            : true_type
     270        { /* DUMMY BODY */ };
     271
     272        template<class T>
     273        inline constexpr bool is_transparent_v = is_transparent<T>::value;
    262274    }
    263275
Note: See TracChangeset for help on using the changeset viewer.