Changeset a6c3bf3 in mainline for uspace/lib/cpp/include/__bits/thread/future_common.hpp
- Timestamp:
- 2019-07-01T15:33:01Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8660ad0
- Parents:
- a552044
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/__bits/thread/future_common.hpp
ra552044 ra6c3bf3 30 30 #define LIBCPP_BITS_THREAD_FUTURE_COMMON 31 31 32 #include <__bits/aux.hpp> 32 33 #include <system_error> 33 34 #include <stdexcept> … … 82 83 error_code code_; 83 84 }; 85 86 namespace aux 87 { 88 /** 89 * Auxilliary metafunctions that let us avoid 90 * specializations in some cases. They represent 91 * the inner stored type and the return type of 92 * the get() member function, respectively. 93 */ 94 95 template<class T> 96 struct future_inner: aux::type_is<T> 97 { /* DUMMY BODY */ }; 98 99 template<class T> 100 struct future_inner<T&>: aux::type_is<T*> 101 { /* DUMMY BODY */ }; 102 103 template<class T> 104 using future_inner_t = typename future_inner<T>::type; 105 106 template<class T> 107 struct future_return: aux::type_is<const T&> 108 { /* DUMMY BODY */ }; 109 110 template<class T> 111 struct future_return<T&>: aux::type_is<T&> 112 { /* DUMMY BODY */ }; 113 114 template<> 115 struct future_return<void>: aux::type_is<void> 116 { /* DUMMY BODY */ }; 117 118 template<class T> 119 using future_return_t = typename future_return<T>::type; 120 } 84 121 } 85 122
Note:
See TracChangeset
for help on using the changeset viewer.