Opened 4 years ago

Closed 4 years ago

#9333 closed Bugs (fixed)

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

Attachments (0)

Change History (8)

comment:1 Changed 4 years ago by viboes

Owner: changed from Anthony Williams to viboes
Status: newassigned

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: Boost 1.55.0Boost Development Trunk

comment:7 Changed 4 years ago by viboes

Milestone: To Be DeterminedBoost 1.56.0

comment:8 Changed 4 years ago by viboes

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain viboes.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.