Opened 9 years ago

Closed 9 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:

Description

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" 

scoped_thread.cpp
..\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 (8)

comment:1 by viboes, 9 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:2 by sergey.cheban@…, 9 years ago

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

#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)

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)...) {}

#else

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

comment:3 by sergey.cheban@…, 9 years ago

See also connect.microsoft.com/VisualStudio/feedback/details/808123/private-default-template-type

comment:4 by viboes, 9 years ago

Thanks for the fix.

Committed revision [86595].

comment:5 by dani@…, 9 years ago

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

comment:6 by viboes, 9 years ago

Version: Boost 1.55.0Boost Development Trunk

comment:7 by viboes, 9 years ago

Milestone: To Be DeterminedBoost 1.56.0

comment:8 by viboes, 9 years ago

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