Howard Hinnant | 54da338 | 2010-08-30 18:46:21 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Howard Hinnant | b64f8b0 | 2010-11-16 22:09:02 +0000 | [diff] [blame] | 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
Howard Hinnant | 54da338 | 2010-08-30 18:46:21 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
Jonathan Roelofs | 8d86b2e | 2014-09-05 19:45:05 +0000 | [diff] [blame] | 9 | // |
| 10 | // UNSUPPORTED: libcpp-has-no-threads |
Howard Hinnant | 54da338 | 2010-08-30 18:46:21 +0000 | [diff] [blame] | 11 | |
| 12 | // <future> |
| 13 | |
| 14 | // template<class R, class... ArgTypes> |
| 15 | // class packaged_task<R(ArgTypes...)> |
| 16 | // { |
| 17 | // public: |
| 18 | // typedef R result_type; |
| 19 | |
| 20 | #include <future> |
| 21 | #include <type_traits> |
| 22 | |
| 23 | struct A {}; |
| 24 | |
| 25 | int main() |
| 26 | { |
| 27 | static_assert((std::is_same<std::packaged_task<A(int, char)>::result_type, A>::value), ""); |
| 28 | } |