[ 
https://issues.apache.org/jira/browse/THRIFT-3995?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King III closed THRIFT-3995.
-------------------------------------

This issue was resolved without a fixVersion but was not closed - closing.

> error: 'boost::thread::id::id(boost::thread::id::data)' is private
> ------------------------------------------------------------------
>
>                 Key: THRIFT-3995
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3995
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>         Environment: Windows, MinGW/[MSYS2|https://msys2.github.io], GCC 
> 6.2.0, Boost 1.62.0
>            Reporter: Stefan Zimmermann
>            Priority: Major
>
> When compiling {{7ab125a253e5aebbf2a0ed9a0a1602a4b879eca7}} under MinGW/MSYS2 
> with GCC 6.2.0 and Boost 1.62.0 and some workaround for 
> [THRIFT-3994|https://issues.apache.org/jira/browse/THRIFT-3994], the next 
> problem occurs:
> {code}
> src/thrift/concurrency/PosixThreadFactory.cpp: In member function 'virtual 
> apache::thrift::concurrency::Thread::id_t 
> apache::thrift::concurrency::PthreadThread::getId()':
> src/thrift/concurrency/PosixThreadFactory.cpp:175:26: error: 
> 'boost::thread::id::id(boost::thread::id::data)' is private within this 
> context
>      return (Thread::id_t)pthread_;
> {code}
> {code}
> src/thrift/concurrency/PosixThreadFactory.cpp: In member function 'virtual 
> apache::thrift::concurrency::Thread::id_t 
> apache::thrift::concurrency::PosixThreadFactory::getCurrentThreadId() const':
> src/thrift/concurrency/PosixThreadFactory.cpp:309:37: error: 
> 'boost::thread::id::id(boost::thread::id::data)' is private within this 
> context
>    return (Thread::id_t)pthread_self();
> {code}
> A quick workaround is to create a local {{pthread_t}} variable and do a 
> {{reinterpret_cast<Thread::id_t&>(...)}} instead, but this is not a clean 
> solution :) and raises:
> {code}
> warning: dereferencing type-punned pointer will break strict-aliasing rules 
> [-Wstrict-aliasing]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to