[Boost-bugs] [Boost C++ Libraries] #12142: Including optional/optional_fwd.hpp then type_traits.hpp

Subject: [Boost-bugs] [Boost C++ Libraries] #12142: Including optional/optional_fwd.hpp then type_traits.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-04-20 19:55:31

#12142: Including optional/optional_fwd.hpp then type_traits.hpp
 Reporter: Tony Lewis <tonyelewis@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: config
  Version: Boost 1.61.0 | Severity: Regression
 Keywords: |
  config/suffix.hpp,type_traits,optional |
 1.61.0 beta introduces a new problem: the following code has started
 failing to compile since 1.60.0:

 #include <boost/optional/optional_fwd.hpp>
 #include <boost/type_traits.hpp>

 This appears to be caused by a change to `optional_fwd.hpp` so that it now
 includes `boost/config/suffix.hpp`. It turns out that that already had the
 potential to cause problems in 1.60.0, eg the following fails to compile:

 #include <boost/config/suffix.hpp>
 #include <boost/type_traits.hpp>

 Does Boost.Config allow other Boost libraries to include
 `boost/config/suffix.hpp` directly? If so, I think Config needs to fix the
 above problem. If not, `optional_fwd.hpp` needs to be changed to include
 `boost/config.hpp` not `boost/config/suffix.hpp` (and in that case it
 might be good to do the following).
  1. scan for any other includes in any other Boost libraries
  1. fix them
  1. move `suffix.hpp` and similar in a `detail` subdirectory.

 I'm seeing equivalent errors on both Clang 3.6.2-1 and GCC 5.2.1.

 Command lines:

 clang++ -std=c++11 -isystem /opt/boost_1_61_0_b1_clang_build/include a.cpp
 g++ -std=c++11 -isystem /opt/boost_1_61_0_b1_gcc_build/include a.cpp

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