[Boost-bugs] [Boost C++ Libraries] #11380: Container library std forward declarations incorrect in std_fwd.hpp on libc++ with gcc

Subject: [Boost-bugs] [Boost C++ Libraries] #11380: Container library std forward declarations incorrect in std_fwd.hpp on libc++ with gcc
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-06-08 06:36:56


#11380: Container library std forward declarations incorrect in std_fwd.hpp on
libc++ with gcc
-------------------------------------+------------------------
 Reporter: tsniatowski@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------+------------------------
 std_fwd.hpp contains code to detect libc++ and try to forward declare some
 types there appropriately. However, the ifdef logic assumes that libc++ is
 only ever used on Clang, which is incorrect. It is possible to use libc++
 with GCC, for example on Android where you generally choose the compiler
 and C++ library separately.

 Currently, "#if defined(__clang__) && defined(_LIBCPP_VERSION)" is used to
 trigger libc++-specific style of forward declarations. Only
 _LIBCPP_VERSION should be checked, with a secondary __clang__ check to
 disable a warning.

 As a side note, shouldn't there be a build-time setting to disable this
 std:: forwarding altogether? It feels fragile, and borderline UB. It
 sacrifices portability for some potential build speed improvement, which
 might not be the best choice for everyone.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11380>
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:18 UTC