Code question on fusion tag_of.hpp

Hi Folks During a recent bug hunt, we came across the following (Boost 1.49, fusion/adapted/std_tuple/tag_of.hpp): #include <tuple> namespace std { template <typename... Elements> class tuple; } We find this rather puzzling -- why is this here? As far as we can tell, this doesn't do anything. (Well, it did participate in a long, ugly compiler error about variadic templates, which is why we found it.) What are we missing? Thanks for any insight. -- Dave Steffen Software Engineer NUMERICA CORPORATION www.numerica.us (970) 461-2000 main (970) 612-2327 direct

On 08/08/2012 23:39, Dave Steffen wrote:
Hi Folks
During a recent bug hunt, we came across the following (Boost 1.49, fusion/adapted/std_tuple/tag_of.hpp):
#include <tuple>
namespace std { template <typename... Elements> class tuple; }
We find this rather puzzling -- why is this here? As far as we can tell, this doesn't do anything.
It forward declares std::tuple so that it can specialize its traits for it. But it really shouldn't do that, since there is no guarantee this declaration is compatible with the standard one.
participants (2)
-
Dave Steffen
-
Mathias Gaunard