#12142 closed Bugs (fixed)
Including optional/optional_fwd.hpp then type_traits.hpp
Reported by: | Owned by: | akrzemi1 | |
---|---|---|---|
Milestone: | Boost 1.62.0 | Component: | optional |
Version: | Boost 1.61.0 | Severity: | Regression |
Keywords: | config/suffix.hpp, type_traits, optional | Cc: |
Description
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).
- scan for any other includes in any other Boost libraries
- fix them
- move
suffix.hpp
and similar in adetail
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
Change History (5)
comment:1 by , 6 years ago
Component: | config → optional |
---|---|
Owner: | changed from | to
comment:3 by , 6 years ago
Milestone: | To Be Determined → Boost 1.62.0 |
---|---|
Owner: | changed from | to
comment:4 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 6 years ago
Yes - the develop branch of the boostorg/optional !GitHub repo now works for me.
Thanks very much for your work on this.
No way should optional be including an internal Config header directly - that's just not supported.