Subject: [Boost-bugs] [Boost C++ Libraries] #8418: Boost Fusion foreach works for std::tuple OR boost::tuple depending on inclusion order
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-08 12:16:00
#8418: Boost Fusion foreach works for std::tuple OR boost::tuple depending on
inclusion order
--------------------------+-------------------------------------------------
Reporter: bugs@⦠| Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.53.0
Severity: Problem | Keywords: fusion tuple adapted
--------------------------+-------------------------------------------------
As my attached repro sample shows can't adapt std::tuple and boost::tuple
at the same time.
The headers
{{{
# include <boost/fusion/adapted/boost_tuple.hpp>
# include <boost/fusion/adapted/std_tuple.hpp>
}}}
seem to mutually exclude each other (at least in this code sample). Which
ever header of the two gets included _first_, determines which type of
tuple will be usable as a fusion sequence in that TU.
In the case of the 'blanket' include `boost/fusion/adapted.hpp` this means
that std::tuple is not usable as a Fusion Sequence - unless one
explicitely include `boost/fusion/adapted/std_tuple.hpp` _ahead_ of that.
This is rather surprising, and obviously causes problems for people mixing
std::tuple and boost::tuple within a sinlge TU.
Also, although I haven't looked too deeply into the mechanics of it, I
worry a bit that this may be a signal that '''ODR violations''' could be
lurking when different TUs include the headers in different order.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8418> 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:12 UTC