summaryrefslogtreecommitdiffstats
path: root/libcxx/test/libcxx/thread/futures/futures.task/types.pass.cpp
blob: cb0fb803c6ab2632c43505aedab6ee744b372cbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: c++98, c++03

// <future>

// template<class R, class... ArgTypes>
//     class packaged_task<R(ArgTypes...)>
// {
// public:
//     typedef R result_type; // extension

// This is a libc++ extension.

#include <future>
#include <type_traits>

struct A {};

int main()
{
    static_assert((std::is_same<std::packaged_task<A(int, char)>::result_type, A>::value), "");
}
OpenPOWER on IntegriCloud