# future File Reference

Go to the source code of this file.

## Classes

- class std::__basic_future< _Res >
    Common implementation for future and shared_future. More...
- struct std::__future_base
    Base class and enclosing scope. More...
- struct std::__future_base::_Ptr< _Res >
    A unique_ptr based on the instantiating type. More...
- struct std::__future_base::_Result< _Res >
    Result. More...
- struct std::__future_base::_Result< _Res & >
    Partial specialization for reference types. More...
- struct std::__future_base::_Result< void >
    Explicit specialization for void. More...
- struct std::__future_base::_Result_base
    Base class for results. More...
- class std::__future_base::_State
    Shared state between a promise and one or more associated futures. More...
- class std::future< _Res >
    Primary template for future. More...
- class std::future< _Res & >
    Partial specialization for future<R&> More...
- class std::future< void >
    Explicit specialization for future<void> More...
- class std::future_error
    Exception type thrown by futures. More...
- class std::packaged_task< _Res(_ArgTypes...)>
    packaged_task More...
- class std::promise< _Res >
    Primary template for promise. More...
- class std::promise< _Res & >
    Partial specialization for promise<R&> More...
- class std::promise< void >
    Explicit specialization for promise<void> More...
- class std::shared_future< _Res >
    Primary template for shared_future. More...
- class std::shared_future< _Res & >
    Partial specialization for shared_future<R&> More...
- class std::shared_future< void >
    Explicit specialization for shared_future<void> More...

## Namespaces

- namespace std

## Enumerations

- enum std::future_errc { broken_promise, future_already_retrieved, promise_already_satisfied, no_state }
- enum launch { any, async, sync }

## Functions

- template<typename _Fn , typename... _Args> future< typename result_of
  < _Fn(_Args...)>::type > std::async (launch __policy, _Fn &&__fn, _Args &&...__args)
- template<typename _Fn , typename... _Args> enable_if<!is_same< typename
  decay< _Fn >::type, launch >
  ::value, future< decltype(std::declval
  < _Fn >)(std::declval< _Args >
  )...))> >::type std::async (_Fn &&__fn, _Args &&...__args)
- error_code std::make_error_code (future_errc __errc)
- error_condition std::make_error_condition (future_errc __errc)
- template<typename _Res > void std::swap (promise< _Res > &__x, promise< _Res > &__y)
- template<typename _Res , typename... _ArgTypes> void std::swap (packaged_task< _Res(_ArgTypes...)> &__x, packaged_task< _Res(_ArgTypes...)> &__y)

## Variables

- const error_category *const std::future_category

## Detailed Description

This is a Standard C++ Library header.

Definition in file future.