Boost logo

Boost :

From: Steven Watanabe (steven_at_[hidden])
Date: 2006-12-29 14:47:39


AMDG

"Richard Crossley" wrote:
> Thanks for your help, though I'm somewhat uncertain as to what's going on.
> Your example would appear to be able to be simplified further or am I
> misunderstanding?
>
> struct undefined;
>
> template<class T>
> struct C {
> T t;
> };
>
> void f(void*){}
>
> int main() {
> C<undefined> * p = 0; // OK
> f(p); // ERROR
> }

You're right. I just got confused. I must have tried something like

template<class T>
struct C {
    //no use of T here
};

I think what the compiler is doing may actually be
correct. (see 3.4.2 and 14.7.1). The standard was obviously
not written with placeholders in mind.

Actually there is an easy hack to make this work.
Just add:
    struct boost::recursive_variant_ {};

In Christ,
Steven Watanabe


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