Modify

Ticket #9333 (closed Bugs: fixed)

Opened 6 months ago

Last modified 6 weeks 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:

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
            

Attachments

Change History

comment:1 Changed 6 months ago by viboes

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

comment:2 Changed 5 months ago by sergey.cheban@…

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 Changed 5 months ago by sergey.cheban@…

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

comment:4 Changed 5 months ago by viboes

Thanks for the fix.

Committed revision [86595].

comment:5 Changed 5 months ago by dani@…

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

comment:6 Changed 5 months ago by viboes

  • Version changed from Boost 1.55.0 to Boost Development Trunk

comment:7 Changed 2 months ago by viboes

  • Milestone changed from To Be Determined to Boost 1.56.0

comment:8 Changed 6 weeks ago by viboes

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

Add a comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.