WPILibC++ 2024.3.2
wpi::promise< void > Class Referencefinal

Explicit specialization for promise<void>. More...

#include <wpi/future.h>

Public Member Functions

 promise ()
 Constructs an empty promise. More...
 
 promise (promise &&oth) noexcept
 
 promise (const promise &)=delete
 
 ~promise ()
 Sets the promised value if not already set. More...
 
promiseoperator= (promise &&oth) noexcept
 
promiseoperator= (const promise &)=delete
 
void swap (promise &oth) noexcept
 Swaps this promise with another one. More...
 
future< void > get_future () noexcept
 Gets a future for this promise. More...
 
void set_value ()
 Sets the promised value. More...
 

Friends

class PromiseFactory< void >
 

Detailed Description

Explicit specialization for promise<void>.

Constructor & Destructor Documentation

◆ promise() [1/3]

wpi::promise< void >::promise ( )
inline

Constructs an empty promise.

◆ promise() [2/3]

wpi::promise< void >::promise ( promise< void > &&  oth)
inlinenoexcept

◆ promise() [3/3]

wpi::promise< void >::promise ( const promise< void > &  )
delete

◆ ~promise()

wpi::promise< void >::~promise ( )
inline

Sets the promised value if not already set.

Member Function Documentation

◆ get_future()

future< void > wpi::promise< void >::get_future ( )
inlinenoexcept

Gets a future for this promise.

Returns
The future

◆ operator=() [1/2]

promise & wpi::promise< void >::operator= ( const promise< void > &  )
delete

◆ operator=() [2/2]

promise & wpi::promise< void >::operator= ( promise< void > &&  oth)
inlinenoexcept

◆ set_value()

void wpi::promise< void >::set_value ( )
inline

Sets the promised value.

Only effective once (subsequent calls will be ignored).

◆ swap()

void wpi::promise< void >::swap ( promise< void > &  oth)
inlinenoexcept

Swaps this promise with another one.

Friends And Related Function Documentation

◆ PromiseFactory< void >

friend class PromiseFactory< void >
friend

The documentation for this class was generated from the following file: