Ticket #9333 (closed Bugs: fixed)

Opened 4 years ago

Last modified 3 years ago

ex_scoped_thread compile fails on msvc-12.0

Reported by: viboes Owned by: viboes
Milestone: Boost 1.56.0 Component: thread
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:


Test output: teeks99-10-win2008-64on64 - thread - ex_scoped_thread / msvc-12.0
Rev 86532 / Fri, 01 Nov 2013 12:53:59 +0000
Compile [2013-11-01 22:52:21 UTC]: fail

    call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64 >nul
cl /Zm800 -nologo @"C:\local\results\boost\bin.v2\libs\thread\test\ex_scoped_thread.test\msvc-12.0\debug\address-model-64\threading-multi\scoped_thread.obj.rsp" 

..\libs\thread\test\..\example\scoped_thread.cpp(36) : warning C4512: 'func' : assignment operator could not be generated
        ..\libs\thread\test\..\example\scoped_thread.cpp(21) : see declaration of 'func'
..\libs\thread\test\..\example\scoped_thread.cpp(88) : error C2661: 'boost::scoped_thread<boost::join_if_joinable>::scoped_thread' : no overloaded function takes 3 arguments


Change History

comment:1 Changed 4 years ago by viboes

  • Owner changed from anthonyw to viboes
  • Status changed from new to assigned

comment:2 Changed 4 years ago by sergey.cheban@…

The following code in the scoped_thread.hpp fails because struct dummy is not public:


template <class F, class ...Args, typename = typename disable_if<is_same<typename decay<F>::type, thread>, dummy* >::type> explicit scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(Args)... args) :

t_(boost::forward<F>(f), boost::forward<Args>(args)...) {}


To resolve the problem, it is enough to replace "dummy*" with "void*".

comment:3 Changed 4 years ago by sergey.cheban@…

See also

comment:4 Changed 4 years ago by viboes

Thanks for the fix.

Committed revision [86595].

comment:5 Changed 4 years ago by dani@…

According to my test runs with vc12, the fix is fine!

comment:6 Changed 4 years ago by viboes

  • Version changed from Boost 1.55.0 to Boost Development Trunk

comment:7 Changed 3 years ago by viboes

  • Milestone changed from To Be Determined to Boost 1.56.0

comment:8 Changed 3 years ago by viboes

  • Status changed from assigned to closed
  • Resolution set to fixed

Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.