xref: /aosp_15_r20/external/cronet/third_party/libc++/src/test/libcxx/thread/futures/futures.task/types.pass.cpp (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // UNSUPPORTED: no-threads
10 // UNSUPPORTED: c++03
11 
12 // <future>
13 
14 // template<class R, class... ArgTypes>
15 //     class packaged_task<R(ArgTypes...)>
16 // {
17 // public:
18 //     typedef R result_type; // extension
19 
20 // This is a libc++ extension.
21 
22 #include <future>
23 #include <type_traits>
24 
25 #include "test_macros.h"
26 
27 struct A {};
28 
main(int,char **)29 int main(int, char**)
30 {
31     static_assert((std::is_same<std::packaged_task<A(int, char)>::result_type, A>::value), "");
32 
33   return 0;
34 }
35