Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/experimental/lib extensions/promise/uses allocator"

From cppreference.com
m (link to zh)
m (fmt)
 
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}}
  
 
{{langlinks|zh}}
 
{{langlinks|zh}}

Latest revision as of 02:39, 17 July 2023

 
 
Experimental
Technical Specification
Filesystem library (filesystem TS)
Library fundamentals (library fundamentals TS)
Library fundamentals 2 (library fundamentals TS v2)
Library fundamentals 3 (library fundamentals TS v3)
Extensions for parallelism (parallelism TS)
Extensions for parallelism 2 (parallelism TS v2)
Extensions for concurrency (concurrency TS)
Extensions for concurrency 2 (concurrency TS v2)
Concepts (concepts TS)
Ranges (ranges TS)
Reflection (reflection TS)
Mathematical special functions (special functions TR)
Experimental Non-TS
Pattern Matching
Linear Algebra
std::execution
Contracts
2D Graphics
 
 
 
Defined in header <experimental/future>
template< class R, class Alloc >

struct uses_allocator<std::experimental::promise<R>, Alloc>

    : std::true_type {};
(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

checks if the specified type supports uses-allocator construction
(class template) [edit]