Boost logo

Boost :

From: Geurt Vos (G.Vos_at_[hidden])
Date: 2002-02-15 03:19:45


Figures...I didn't read the news yesterday.
So until someone proves it otherwise, I'll
say my code is correct...and provide the
work-around instead.

Thanks,
Geurt

>
> Funny you should mention this, as I just posted nearly an identical
> question to comp.std.c++ and comp.lang.c++.moderated ;) The reply I
> received indicated that these compilers were misinterpreting the
> standard, and that the code should in fact be legal.
>
> +tim
>
> --- In boost_at_y..., "Geurt Vos" <G.Vos_at_r...> wrote:
> >
> > I have a properties implementation ready for upload.
> > However, in its current form most compilers can't
> > handle it. I'm uncertain whether this is due to bad
> > language support or because of non-standard code.
> > Now, I will try to work around the issue (which should
> > be possible), but I would like to know who's wrong (for
> > a side note in the code, etc.). First note that I posted
> > this question to c.l.c++.m not so long ago, but didn't
> > get any response. Basically it comes down to this:
> >
> > template <typename T, T> class A { };
> >
> > template <class T> class B;
> >
> > template <typename T, T v>
> > class B<A<T,v> > {
> > };
> >
> > Both Borland C++ 5.5.1 and GCC 3.0.2 think it's cool.
> > GCC 2.95.2 simply can't find the specialization, and
> > both Intel C++ 5.0 and Comeau C++ 4.2.45.2 error out
> > with:
> > ---
> > the type of partial specialization template parameter
> > constant "v" depends on another template parameter
> > ---
> >
> > Section 14.5.4 [temp.class.spec], note 9 reads:
> > --
> > The type of a template parameter corresponding to
> > a specialized nontype argument shall not be dependent
> > on a parameter of the specialization.
> > --
> >
> > In my case I am not specializing a nontype argument but
> > a type argument, so this part (which is the only relevant
> > one I could find) does not apply. In other words, the
> > standard doesn't say it's invalid to use a dependent nontype
> > in a specialization of a type argument, correct?
> >
> > TIA,
> > Geurt
>
>
> Info: http://www.boost.org Send unsubscribe requests to:
<mailto:boost-unsubscribe_at_[hidden]>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk