|
Boost : |
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-01-12 15:55:40
----- Original Message -----
From: "David Abrahams" <dave_at_[hidden]>
> > In other words, the "void" parameter list is fundamentally different
than
> > "type void".
>
> That's not a very good test case, though. *Matching* a void parameter
> could easily be different from generating one. What about:
>
> template <class T> struct id { typedef T type; };
> struct X
> {
> void f(id<void>::type);
> };
>
> "ComeauTest.c", line 4: warning: declaring a void parameter list with
a typedef is
> nonstandard
> operator int(id<void>::type);
>
> ??
>
> I'd prefer it if matching void in a parameter list *were* different
> from generating one. The above prevents the use of SFINAE to generate
> restricted templated conversion operators.
I agree, it would be nice if it was legal, but I don't think it is. The
"void" parameter list is not of type "void."
Paul Mensonides
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk