| /system/ulib/fbl/include/fbl/ |
| A D | type_support.h | 9 template <typename T, T v> 168 constexpr T&& forward(typename remove_reference<T>::type& t) { 173 constexpr T&& forward(typename remove_reference<T>::type&& t) { 181 template<class T> struct is_same<T, T> : true_type {}; 186 template<class T> struct enable_if<true, T> { 235 template<typename T, bool = is_arithmetic<T>::value> 236 struct is_signed : integral_constant<bool, T(-1) < T(0)> {}; 240 template<typename T, bool = is_arithmetic<T>::value> 245 template<typename T, bool = is_integral<T>::value> 250 template<typename T, bool = is_integral<T>::value> [all …]
|
| A D | atomic.h | 118 bool compare_exchange_weak(T* expected, T desired, in compare_exchange_weak() 124 bool compare_exchange_weak(T* expected, T desired, in compare_exchange_weak() 332 bool atomic_compare_exchange_weak(atomic<T>* atomic_ptr, T* expected, T desired, 338 bool atomic_compare_exchange_weak(volatile atomic<T>* atomic_ptr, T* expected, T desired, 345 bool atomic_compare_exchange_strong(atomic<T>* atomic_ptr, T* expected, T desired, 352 bool atomic_compare_exchange_strong(volatile atomic<T>* atomic_ptr, T* expected, T desired, 359 typename enable_if<!is_pointer<T>::value, T>::type 364 typename enable_if<!is_pointer<T>::value, T>::type 378 typename enable_if<!is_pointer<T>::value, T>::type 383 typename enable_if<!is_pointer<T>::value, T>::type [all …]
|
| A D | ref_ptr.h | 21 RefPtr<T> AdoptRef(T* ptr); 24 RefPtr<T> WrapRefPtr(T* ptr); 28 RefPtr<T> MakeRefPtrNoAdopt(T* ptr); 200 friend RefPtr<T> AdoptRef<T>(T*); 201 friend RefPtr<T> internal::MakeRefPtrNoAdopt<T>(T*); 224 T* ptr_; 246 inline RefPtr<T> AdoptRef(T* ptr) { in AdoptRef() 247 return RefPtr<T>(ptr, RefPtr<T>::ADOPT); in AdoptRef() 252 inline RefPtr<T> WrapRefPtr(T* ptr) { in WrapRefPtr() 261 inline RefPtr<T> MakeRefPtrNoAdopt(T* ptr) { in MakeRefPtrNoAdopt() [all …]
|
| A D | intrusive_pointer_traits.h | 22 template <typename T> 23 struct ContainerPtrTraits<T*> { 24 using ValueType = T; 25 using RefType = T&; 27 using PtrType = T*; 29 using RawPtrType = T*; 48 template <typename T> 50 using ValueType = T; 51 using RefType = T&; 75 using ValueType = T; [all …]
|
| A D | recycler.h | 83 template <typename T, typename = void> 88 static_assert(is_same<T, T>::value == false, 97 template <typename T> 98 using has_fbl_recycle = is_base_of<::fbl::Recyclable<typename remove_cv<T>::type>, T>; 104 template <typename T, typename = void> 109 template <typename T> 110 struct recycler<T, typename enable_if<has_fbl_recycle<T>::value == true>::type> { 119 template <typename T> 120 class Recyclable<T, 121 typename enable_if<is_same<typename remove_cv<T>::type, T>::value>::type> { [all …]
|
| A D | algorithm.h | 12 template<class T> 13 constexpr const T& min(const T& a, const T& b) { in min() 17 template<class T> 18 constexpr const T& max(const T& a, const T& b) { in max() 22 template<class T> 23 constexpr const T& clamp(const T& v, const T& lo, const T& hi) { in clamp() 35 template <typename T> 156 const T* lower_bound(const T* first, const T* last, const U& value) { 175 const T* lower_bound(const T* first, const T* last, const U& value, Compare comp) { 200 T gcd(T first, T second) { [all …]
|
| A D | unique_ptr.h | 23 template <typename T> 62 T* t = ptr_; in release() 71 T* t = ptr_; in swap() 76 T* get() const { in get() 132 T* ptr_; 171 T* t = ptr_; in release() 181 T* t = ptr_; in swap() 186 T* get() const { in get() 198 T* ptr_; 230 return unique_ptr<T>(new T(std::forward<Args>(args)...)); [all …]
|
| A D | deleter.h | 11 template <typename T> 13 inline void operator()(T* ptr) const { in operator() 14 enum { type_must_be_complete = sizeof(T) }; in operator() 19 template <typename T> 20 struct default_delete<T[]> { 21 inline void operator()(T* ptr) const { 22 enum { type_must_be_complete = sizeof(T) }; 35 template <typename T, size_t n> 36 struct default_delete<T[n]> { 38 static_assert(sizeof(T) == -1, "do not use array with size as type in fbl pointers");
|
| A D | vector.h | 83 T* out = ptr_; in Vector() 132 T* t = ptr_; in swap() 200 const T* get() const { in get() 204 T* get() { in get() 217 T* begin() const { in begin() 221 T* end() const { in end() 341 ptr_[i].~T(); 424 T* release() { in release() 425 T* t = ptr_; in release() 437 T* ptr = ptr_; in reset() [all …]
|
| A D | unique_free_ptr.h | 15 template <typename T> 55 T* release() { in release() 56 T* t = ptr_; in release() 60 void reset(T* t = nullptr) { 65 T* t = ptr_; in swap() 70 T* get() const { in get() 78 T& operator*() const { 81 T* operator->() const { 86 T* ptr_; 90 template <typename T> [all …]
|
| /system/ulib/fit/include/lib/fit/ |
| A D | optional.h | 17 template <typename T, bool = std::is_assignable<T&, const T&>::value> 19 static void assign(T* dest, const T& source) { in assign() 27 static void assign(T* dest, const T& source) { 32 template <typename T, bool = std::is_assignable<T&, T&&>::value> 34 static void assign(T* dest, T&& source) { 39 static void swap(T& a, T& b) { 41 a.~T(); 43 b.~T(); 50 static void assign(T* dest, T&& source) { 54 static void swap(T& a, T& b) { [all …]
|
| A D | nullable.h | 20 template <typename T> 21 struct is_comparable_with_null<T, decltype(std::declval<const T&>() == nullptr)> 29 template <typename T> 30 struct is_null_predicate<T, decltype(std::declval<const T&>() == nullptr)> { 43 template <typename T> 50 template <typename T> 71 template <typename T, bool = (is_nullable<T>::value && 72 std::is_constructible<T, T&&>::value && 73 std::is_assignable<T&, T&&>::value)> 200 T value_; [all …]
|
| A D | defer.h | 22 template <typename T> 30 explicit deferred_action(T target) in deferred_action() 62 T local_target = std::move(*target_); in call() 79 deferred_action& operator=(T target) { 88 nullable<T> target_; 91 template <typename T> 95 template <typename T> 99 template <typename T> 103 template <typename T> 131 template <typename T> [all …]
|
| /system/ulib/trace/include/trace/internal/ |
| A D | event_args.h | 102 template <typename T> 104 T, 113 template <typename T> 115 T, 123 template <typename T> 125 T, 135 template <typename T> 137 T, 146 template <typename T> 154 template <typename T> [all …]
|
| /system/utest/fit/ |
| A D | optional_tests.cpp | 90 fit::optional<T> opt(T{42}); in construct_with_value() 111 fit::optional<T> a(T{42}); in construct_copy() 129 fit::optional<T> a(T{42}); in construct_move() 146 fit::optional<T> a(T{42}); in accessors() 153 T rvalue = fit::optional<T>(T{42}).value(); in accessors() 168 fit::optional<T> a(T{42}); in assign() 193 fit::optional<T> a(T{42}); in assign_copy() 194 fit::optional<T> b(T{55}); in assign_copy() 241 fit::optional<T> a(T{42}); in assign_move() 242 fit::optional<T> b(T{55}); in assign_move() [all …]
|
| A D | defer_tests.cpp | 46 template <typename T> 56 template <typename T> 66 template <typename T> 87 template <typename T> 115 template <typename T> 139 template <typename T> 159 template <typename T> 183 template <typename T> 208 template <typename T> 227 template <typename T> [all …]
|
| /system/utest/fbl/ |
| A D | atomic_tests.cpp | 356 using ordinary_op = T (*)(T*, T); 359 using atomic_op = T (*)(fbl::atomic<T>*, T, fbl::memory_order); 533 [](T* ptr_to_a, T b) -> T { in __anonac9e3fa60202() 548 [](T* ptr_to_a, T b) -> T { in __anonac9e3fa60502() 563 [](T* ptr_to_a, T b) -> T { in __anonac9e3fa60802() 578 [](T* ptr_to_a, T b) -> T { in __anonac9e3fa60b02() 596 [](T* ptr_to_a, T b) -> T { in __anonac9e3fa60e02() 927 {[](fbl::atomic<T>* atomic_ptr, T* expected, T desired, 932 {[](fbl::atomic<T>* atomic_ptr, T* expected, T desired, 950 {[](volatile fbl::atomic<T>* atomic_ptr, T* expected, T desired, [all …]
|
| /system/ulib/fidl/include/lib/fidl/llcpp/ |
| A D | array_wrapper.h | 16 template <typename T, size_t N> 20 const T* data() const { return data_; } in data() 21 T* data() { return data_; } in data() 24 T& at(size_t offset) { return data()[offset]; } in at() 29 T* begin() { return data(); } in begin() 30 const T* begin() const { return data(); } in begin() 31 const T* cbegin() const { return data(); } in cbegin() 33 T* end() { return data() + size(); } in end() 34 const T* end() const { return data() + size(); } in end() 35 const T* cend() const { return data() + size(); } in cend() [all …]
|
| /system/ulib/fidl/include/lib/fidl/cpp/ |
| A D | vector_view.h | 12 template<typename T> 20 const T* data() const { return static_cast<T*>(fidl_vector_t::data); } in data() 21 void set_data(T* data) { fidl_vector_t::data = data; } in set_data() 23 T* mutable_data() const { return static_cast<T*>(fidl_vector_t::data); } in mutable_data() 32 T& operator[](size_t offset) { return at(offset); } 34 T* begin() { return mutable_data(); } in begin() 35 const T* begin() const { return data(); } in begin() 36 const T* cbegin() const { return data(); } in cbegin() 38 T* end() { return mutable_data() + count(); } in end() 39 const T* end() const { return data() + count(); } in end() [all …]
|
| A D | builder.h | 48 template <typename T> 49 T* New() { in New() 50 static_assert(alignof(T) <= FIDL_ALIGNMENT, ""); in New() 51 static_assert(sizeof(T) <= ZX_CHANNEL_MAX_MSG_BYTES, ""); in New() 52 if (void* ptr = Allocate(sizeof(T))) in New() 53 return new (ptr) T; in New() 63 template <typename T> 64 T* NewArray(uint32_t count) { in NewArray() 65 static_assert(alignof(T) <= FIDL_ALIGNMENT, ""); in NewArray() 66 static_assert(sizeof(T) <= ZX_CHANNEL_MAX_MSG_BYTES, ""); in NewArray() [all …]
|
| /system/ulib/zx/include/lib/zx/ |
| A D | object.h | 196 template <typename T> bool operator==(const object<T>& a, const object<T>& b) { 200 template <typename T> bool operator!=(const object<T>& a, const object<T>& b) { 204 template <typename T> bool operator<(const object<T>& a, const object<T>& b) { 208 template <typename T> bool operator>(const object<T>& a, const object<T>& b) { 212 template <typename T> bool operator<=(const object<T>& a, const object<T>& b) { 216 template <typename T> bool operator>=(const object<T>& a, const object<T>& b) { 228 template <typename T> bool operator<(zx_handle_t a, const object<T>& b) { 232 template <typename T> bool operator>(zx_handle_t a, const object<T>& b) { 252 template <typename T> bool operator<(const object<T>& a, zx_handle_t b) { 256 template <typename T> bool operator>(const object<T>& a, zx_handle_t b) { [all …]
|
| A D | task.h | 17 template <typename T = void> class task : public object<T> { 21 explicit task(zx_handle_t value) : object<T>(value) {} in task() 23 explicit task(handle&& h) : object<T>(h.release()) {} in task() 25 task(task&& other) : object<T>(other.release()) {} in task() 29 return zx_task_bind_exception_port(object<T>::get(), port.get(), key, options); in bind_exception_port() 32 zx_status_t kill() const { return zx_task_kill(object<T>::get()); } in kill() 35 zx_status_t suspend() const { return zx_task_suspend(object<T>::get()); } in suspend() 41 object<T>::get(), result->reset_and_get_address()); in suspend() 45 return zx_task_resume_from_exception(object<T>::get(), port.get(), options); in resume_from_exception()
|
| /system/ulib/ddktl/include/ddktl/ |
| A D | mmio.h | 252 template <typename T> 257 T val; in Read() 265 template <typename T> 266 T ReadMasked(T mask, zx_off_t offs) const { in ReadMasked() 283 void ModifyBits(T bits, T mask, zx_off_t offs) const { in ModifyBits() 284 T val = Read<T>(offs); in ModifyBits() 285 Write<T>(static_cast<T>((val & ~mask) | (bits & mask)), offs); in ModifyBits() 300 T mask = static_cast<T>(((static_cast<T>(1) << count) - 1) << shift); in GetBits() 301 T val = Read<T>(offs); in GetBits() 312 T mask = static_cast<T>(((static_cast<T>(1) << count) - 1) << shift); in ModifyBits() [all …]
|
| /system/ulib/elf-search/include/ |
| A D | elf-search.h | 16 template <class T> 21 ArrayRef(const T (&arr)[N]) in ArrayRef() 32 const T* get() const { in get() 36 const T* begin() const { in begin() 40 const T* end() const { in end() 53 const T* ptr_ = nullptr; 57 template <class T> 58 bool operator==(ArrayRef<T> a, ArrayRef<T> b) { 70 template <typename T> 71 ArrayRef<T> MakeArrayRef(const T* p, size_t sz) { in MakeArrayRef() [all …]
|
| /system/ulib/lockdep/include/lockdep/ |
| A D | global_reference.h | 12 template <typename T, T& Reference> 17 template <typename T> 19 using Type = T; 21 template <typename T, T& Reference> 22 struct RemoveGlobalReferenceType<GlobalReference<T, Reference>> { 23 using Type = T; 27 template <typename T> 28 using RemoveGlobalReference = typename RemoveGlobalReferenceType<T>::Type;
|