|
Boost : |
Subject: Re: [boost] Code question on fusion tag_of.hpp
From: Dave Steffen (dave.steffen_at_[hidden])
Date: 2012-08-09 12:04:05
Mathias Gaunard wrote:
> 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.
Well, first of all, it's not a forward declaration, right? std::tuple
is declared in whatever gets included with #include<tuple>, right? So
it's not a forward declaration, it's a... what? A backwards
declaration? :-) It's redundant at any rate. (Or I'm completely wrong,
in which case I'm missing something.)
And then, yes, this may or may not be compatible with the real
std::tuple (which is what we were looking in to when we found this).
-- Dave Steffen Software Engineer NUMERICA CORPORATION www.numerica.us (970) 461-2000 main (970) 612-2327 direct
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk