Re: [Boost-bugs] [Boost C++ Libraries] #6655: Inclusion of <boost/signals2.hpp> causes valid code to fail to compile with Clang

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6655: Inclusion of <boost/signals2.hpp> causes valid code to fail to compile with Clang
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-03-06 11:40:11


#6655: Inclusion of <boost/signals2.hpp> causes valid code to fail to compile with
Clang
----------------------------------------------------------+-----------------
  Reporter: Alexander Korsunsky <fat.lobyte9@…> | Owner: fmhess
      Type: Bugs | Status: new
 Milestone: Boost 1.50.0 | Component: signals2
   Version: Boost 1.49.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------------------------------+-----------------

Comment (by Michel Morin <mimomorin@…>):

> The header boost/signals2/detail/foreign_ptr.hpp declares two names in
 the std:: namespace
> which is undefined behaviour, according to the Standard 17.6.4.2.1

 Yep. It's not standard-conforming to forward-declare the standard library
 types
 (though some standard libraries allow it).
 `libc++` uses an inline namespace, and so forward declarations in
 namespace `std`
 causes compile errors.

 [[BR]]
> Please remove the offending lines from the header.
 The solution is to remove the forward declarations and to include
 `<memory>`.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6655#comment:1>
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:09 UTC