Difference between revisions of "cpp/experimental/lib extensions/promise/uses allocator"
From cppreference.com
< cpp | experimental | lib extensions | promise
(create) |
Andreas Krug (Talk | contribs) m (fmt) |
||
(One intermediate revision by one user not shown) | |||
Line 2: | Line 2: | ||
{{cpp/experimental/lib extensions/pmr/navbar}} | {{cpp/experimental/lib extensions/pmr/navbar}} | ||
{{dcl begin}} | {{dcl begin}} | ||
− | {{dcl header | experimental/future}} | + | {{dcl header|experimental/future}} |
− | {{dcl | since=libfund_ts | | + | {{dcl|since=libfund_ts| |
template< class R, class Alloc > | template< class R, class Alloc > | ||
struct uses_allocator<std::experimental::promise<R>, Alloc> | struct uses_allocator<std::experimental::promise<R>, Alloc> | ||
− | : std::true_type { }; | + | : std::true_type {}; |
}} | }} | ||
{{dcl end}} | {{dcl end}} | ||
Line 12: | Line 12: | ||
This specialization of {{lc|std::uses_allocator}} informs other library components that all objects of type {{lc|std::experimental::promise}} support ''uses-allocator construction''. | This specialization of {{lc|std::uses_allocator}} informs other library components that all objects of type {{lc|std::experimental::promise}} support ''uses-allocator construction''. | ||
− | {{cpp/types/integral_constant/inherit2 |{{c|true}}|bool}} | + | {{cpp/types/integral_constant/inherit2|{{c|true}}|bool}} |
===See also=== | ===See also=== | ||
{{dsc begin}} | {{dsc begin}} | ||
− | {{dsc inc | cpp/memory/dsc uses_allocator}} | + | {{dsc inc|cpp/memory/dsc uses_allocator}} |
{{dsc end}} | {{dsc end}} | ||
+ | |||
+ |
Latest revision as of 02:39, 17 July 2023
Defined in header <experimental/future>
|
||
template< class R, class Alloc > struct uses_allocator<std::experimental::promise<R>, Alloc> |
(library fundamentals TS) | |
This specialization of std::uses_allocator informs other library components that all objects of type std::experimental::promise support uses-allocator construction.
Contents |
Inherited from std::integral_constant
Member constants
value [static] |
true (public static member constant) |
Member functions
operator bool |
converts the object to bool, returns value (public member function) |
operator() (C++14) |
returns value (public member function) |
Member types
Type | Definition |
value_type
|
bool |
type
|
std::integral_constant<bool, value> |
[edit] See also
(C++11) |
checks if the specified type supports uses-allocator construction (class template) |