[move] [ thread] ambiguous call to overloaded function

Hello, Did anyone experience the following Revision 70494 tested on msvc2010 with headers the following headers: [code] #include< boost/thread.hpp> #include < boost/move.hpp > ... X x; boost::packaged_task<string_ptr_type> pt(boost::bind(&X::foo, boost::ref(x))); boost::unique_future<string_ptr_type> fs = pt.get_future(); boost::thread task(boost::move(pt)); fs.wait(); ... [code] outputs: .$(BOOST_ROOT)boost/move/move.hpp(304): could be 'boost::packaged_task<R> &boost::move<boost::packaged_task<R>>(T &)' or $(BOOST_ROOT)boost/thread/detail/move.hpp(44): or 'boost::detail::thread_move_t<T> boost::move<boost::packaged_task<R>>(T &)'

El 24/03/2011 13:28, Tal Agmon escribió:
Hello,
Did anyone experience the following
Revision 70494 tested on msvc2010
with headers the following headers:
I think Boost.Thread should not define anything related to "move" in boost namespace, specially since this definition is in thread/detail/move.hpp header (implementation detail), sooner or later it will produce name clashes. I think the only way to address this without breaking user code in Boost 1.47 is to port Boost.Thread to Boost.Move. Ion

Ion Gaztañaga <igaztanaga@gmail.com> writes:
El 24/03/2011 13:28, Tal Agmon escribió:
Hello,
Did anyone experience the following
Revision 70494 tested on msvc2010
with headers the following headers:
I think Boost.Thread should not define anything related to "move" in boost namespace, specially since this definition is in thread/detail/move.hpp header (implementation detail), sooner or later it will produce name clashes.
I think the only way to address this without breaking user code in Boost 1.47 is to port Boost.Thread to Boost.Move.
That's the intention. Anthony -- Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/ just::thread C++0x thread library http://www.stdthread.co.uk Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
participants (3)
-
Anthony Williams
-
Ion Gaztañaga
-
Tal Agmon