[Boost-bugs] [Boost C++ Libraries] #11708: shared_ptr for void

Subject: [Boost-bugs] [Boost C++ Libraries] #11708: shared_ptr for void
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-10-05 19:30:20


#11708: shared_ptr for void
------------------------------+----------------------------
 Reporter: mati_egon@… | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.58.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------------
 Hi, I have been recently working with smart pointers and found out that
 boost ASIO uses std::shared_ptr for void type under Visual Studio 2013
 compiler, what is basically forbidden by standard - void type is an
 incomplete type that can not be complete. It may lead to broken
 compilation under future Microsoft compilers, gcc for sure forbids
 shared_ptr for void type (at least gcc 4.8) throwing static assertion
 during compilation:
 {{{
 static_assert( !is_void<_Tp1>::value, "incomplete type" );
 }}}


 File: asio/details/socket_ops.hpp:63

 {{{
 typedef shared_ptr<void> shared_cancel_token_type;
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11708>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC