Ticket #8418 (closed Bugs: fixed)
Boost Fusion foreach works for std::tuple OR boost::tuple depending on inclusion order
|Reported by:||bugs@…||Owned by:||djowel|
|Milestone:||To Be Determined||Component:||fusion|
|Keywords:||fusion tuple adapted||Cc:||bugs@…, william@…|
As my attached repro sample shows can't adapt std::tuple and boost::tuple at the same time.
# 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.
- Owner set to djowel
- Component changed from None to fusion