Opened 7 years ago
Last modified 5 years ago
#12104 assigned Bugs
windows - Visual Studio 2015 Update 2 RC gives out warning C4191 in thread_primitive.hpp
| Reported by: | Owned by: | viboes | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | thread | 
| Version: | Boost 1.60.0 | Severity: | Problem | 
| Keywords: | Cc: | 
Description (last modified by )
thread/win32/thread_primitives.hpp(312): warning C4191: 'type cast': unsafe conversion from 'boost::detail::win32::farproc_t' to 'boost::detail::win32::detail::gettickcount64_t'
Calling this function through the result pointer may cause your program to fail
Change History (8)
comment:1 by , 7 years ago
comment:2 by , 6 years ago
| Owner: | changed from to | 
|---|---|
| Status: | new → assigned | 
comment:4 by , 6 years ago
| Description: | modified (diff) | 
|---|
comment:5 by , 6 years ago
I hit the same bug.
The workaround is to try including <boost/thread> before <thread>.
comment:7 by , 5 years ago
| Summary: | Visual Studio 2015 Update 2 RC gives out warning C4191 in thread_primitive.hpp → windows - Visual Studio 2015 Update 2 RC gives out warning C4191 in thread_primitive.hpp | 
|---|
comment:8 by , 5 years ago
This file has changed a lot since Boost.Thread has moved to Boost.WinApi.
Please, let me know if those changes solve the issue and we can close it.
  Note:
 See   TracTickets
 for help on using tickets.
    
I am able to reproduce this as well, when doing
#include <boost/thread/mutex.hpp>
within a .cpp that uses boost::lock_guard<boost::mutex>
under Visual Studio 2015 Update 2 RTM