Ignore:
Timestamp:
2019-07-01T15:51:01Z (5 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fda6dd4
Parents:
8660ad0
Message:

cpp: fix return types for future<R>::get and shared_future<R>::get

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/__bits/thread/future_common.hpp

    r8660ad0 r1621f91  
    105105
    106106        template<class T>
    107         struct future_return: aux::type_is<const T&>
     107        struct future_return: aux::type_is<T>
    108108        { /* DUMMY BODY */ };
    109109
     
    112112        { /* DUMMY BODY */ };
    113113
    114         template<>
    115         struct future_return<void>: aux::type_is<void>
     114        template<class T>
     115        using future_return_t = typename future_return<T>::type;
     116
     117        template<class T>
     118        struct future_return_shared: aux::type_is<const T&>
    116119        { /* DUMMY BODY */ };
    117120
    118121        template<class T>
    119         using future_return_t = typename future_return<T>::type;
     122        struct future_return_shared<T&>: aux::type_is<T&>
     123        { /* DUMMY BODY */ };
     124
     125        template<>
     126        struct future_return_shared<void>: aux::type_is<void>
     127        { /* DUMMY BODY */ };
     128
     129        template<class T>
     130        using future_return_shared_t = typename future_return_shared<T>::type;
    120131    }
    121132}
Note: See TracChangeset for help on using the changeset viewer.