Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost.Tuple is not move aware #561

Closed
sithhell opened this issue Oct 3, 2012 · 0 comments
Closed

Boost.Tuple is not move aware #561

sithhell opened this issue Oct 3, 2012 · 0 comments

Comments

@sithhell
Copy link
Member

sithhell commented Oct 3, 2012

Currently, we select boost::tuple as HPX_STD_TUPLE if std::tuple is not available.
This leads to unwanted copies during thread creation and triggers a compile time error:

In file included from jni/boost/boost/tuple/tuple.hpp:33:0,
                 from jni/hpx/hpx/util/coroutine/coroutine.hpp:37,
                 from jni/hpx/hpx/hpx_fwd.hpp:37,
                 from jni/hpx/hpx/hpx.hpp:11,
                 from jni/hpx/src/hpx_init.cpp:8:
jni/hpx/hpx/runtime/threads/thread_init_data.hpp: In constructor 'boost::tuples::cons<HT, TT>::cons(T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&, T10&) [with T1 = const hpx::threads::thread_init_data, T2 = const hpx::threads::thread_state_enum, T3 = const boost::tuples::null_type, T4 = const boost::tuples::null_type, T5 = const boost::tuples::null_type, T6 = const boost::tuples::null_type, T7 = const boost::tuples::null_type, T8 = const boost::tuples::null_type, T9 = const boost::tuples::null_type, T10 = const boost::tuples::null_type, HT = hpx::threads::thread_init_data, TT = boost::tuples::cons<hpx::threads::thread_state_enum, boost::tuples::null_type>]':
jni/boost/boost/tuple/detail/tuple_basic.hpp:492:66:   instantiated from 'boost::tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::tuple(typename boost::tuples::access_traits<T0>::parameter_type, typename boost::tuples::access_traits<T1>::parameter_type) [with T0 = hpx::threads::thread_init_data, T1 = hpx::threads::thread_state_enum, T2 = boost::tuples::null_type, T3 = boost::tuples::null_type, T4 = boost::tuples::null_type, T5 = boost::tuples::null_type, T6 = boost::tuples::null_type, T7 = boost::tuples::null_type, T8 = boost::tuples::null_type, T9 = boost::tuples::null_type, typename boost::tuples::access_traits<T0>::parameter_type = const hpx::threads::thread_init_data&, typename boost::tuples::access_traits<T1>::parameter_type = const hpx::threads::thread_state_enum&]'
jni/hpx/hpx/runtime/threads/policies/thread_queue.hpp:399:13:   instantiated from 'void* hpx::threads::policies::thread_queue<Global>::create_thread(hpx::threads::thread_init_data&, hpx::threads::thread_state_enum, bool, std::size_t, hpx::error_code&) [with bool Global = false, hpx::threads::thread_id_type = void*, std::size_t = unsigned int]'
jni/hpx/hpx/runtime/threads/policies/local_priority_queue_scheduler.hpp:225:69:   instantiated from here
jni/hpx/hpx/runtime/threads/thread_init_data.hpp:96:9: error: 'hpx::threads::thread_init_data::thread_init_data(const hpx::threads::thread_init_data&)' is private
jni/boost/boost/tuple/detail/tuple_basic.hpp:297:65: error: within this context
´´´

The solution for this problem would be to add hpx::util::tuple to the mix similar to what has been done with bind and function
@ghost ghost assigned hkaiser Oct 3, 2012
@hkaiser hkaiser closed this as completed in bda7f76 Oct 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants