Opened 5 years ago

Closed 5 years ago

#13480 closed Bugs (invalid)

When included <boost\thread.hpp>, boost::move uses implemented in boost\thread\detail\move.hpp instead of boost\move\utility_core.hpp

Reported by: Mariano Quesada <mquesada@…> Owned by: viboes
Milestone: To Be Determined Component: thread
Version: Boost 1.66.0 Severity: Problem
Keywords: Cc:

Description

Hello,

Please see the attached file. If fails to build when header file "boost\thread.hpp" is included. Apparently when is not include "::boost:move" is implemented by "boost\move\utility_core.hpp" but when is included then is implemented by "boost\thread\detail\move.hpp".

In both header files there is a boost::move function and it looks like it selects the wrong one. Probably depends on the compiler because this is happening in VS2017 but not in VS2013.

Is there any workaround besides the fix?

Thank you for your help.

Attachments (2)

ConsoleApplicationvs2017.cpp (3.2 KB ) - added by Mariano Quesada <mquesada@…> 5 years ago.
Main file
error_report.txt (8.9 KB ) - added by Mariano Quesada <mquesada@…> 5 years ago.
Compiler error

Download all attachments as: .zip

Change History (6)

by Mariano Quesada <mquesada@…>, 5 years ago

Main file

comment:1 by viboes, 5 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

Please, could you report the compiler error?

by Mariano Quesada <mquesada@…>, 5 years ago

Attachment: error_report.txt added

Compiler error

comment:2 by Mariano Quesada <mquesada@…>, 5 years ago

Thank your for your help. I have attached a file with the compiler error report.

comment:3 by viboes, 5 years ago

I believe the issue is that before version 3, Boost.Thread defined itself boost::move.

You need to define

#define BOOST_THREAD_VERSION 3

or higher when you include boost/thread.hpp and want to be compatible with Boost.Move.

Sorry, but Boost.Thread defined boost::move before it was defined by Boost.Move.

comment:4 by viboes, 5 years ago

Resolution: invalid
Status: assignedclosed
Note: See TracTickets for help on using tickets.