Documentation Home >> Headers >> <experimental/future> Header

The <experimental/future> header provides the extensions to the facilities provided by the <future> header documented in the Concurrency TS.

namespace std{
    namespace experimental {
        template<typename T>
        class future;
        template<typename T>
        class shared_future;

        template<typename FunctionType,typename ... Args>
        future<result_of<FunctionType(Args...)>::type>
        async(FunctionType&& func,Args&& ... args);

        template<typename FunctionType,typename ... Args>
        future<result_of<FunctionType(Args...)>::type>
        async(
            std::launch policy,FunctionType&& func,
            Args&& ... args);

        template<typename ResultType>
        class promise;

        template<typename FunctionSignature>
        class packaged_task; // no definition provided

        template<typename ResultType,typename ... Args>
        class packaged_task<ResultType (Args...)>;

        template<typename Futures>
        struct when_any_result;

        template<typename ... Futures>
        future<when_any_result<std::tuple<Futures...> > >
        when_any(Futures&& ...);

        template<typename Iterator>
        future<
            when_any_result<
                std::vector<typename std::iterator_traits<Iterator>::value_type> > >
        when_any(Iterator begin,Iterator end);

        template<typename ... Futures>
        future<std::tuple<Futures...> >
        when_any(Futures&& ...);

        template<typename Iterator>
        future<std::vector<typename std::iterator_traits<Iterator>::value_type> >
        when_all(Iterator begin,Iterator end);
    }
}
See Also