1
0
Fork 0
arangodb/3rdParty/boost/1.62.0/libs/thread/test/test_11266.cpp

30 lines
621 B
C++

// 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
}