diff options
Diffstat (limited to 'src/boost/libs/thread/test/test_11266.cpp')
-rw-r--r-- | src/boost/libs/thread/test/test_11266.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/boost/libs/thread/test/test_11266.cpp b/src/boost/libs/thread/test/test_11266.cpp new file mode 100644 index 00000000..0f736783 --- /dev/null +++ b/src/boost/libs/thread/test/test_11266.cpp @@ -0,0 +1,29 @@ +// Copyright (C) 2015 Vicente Botet +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_THREAD_VERSION 4 + +#include <boost/thread/future.hpp> + +void func(int) { } + +int main() +{ +#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) + { + boost::packaged_task<void(int)> task{func}; + } + { + boost::packaged_task<void(int)> task{func}; + + task(0); + } + { + boost::packaged_task<void(int)> task{func}; + int x = 0; + task(x); + } +#endif +} |