Can't match void parameters for empty parms in ptr-mem-functions.

Benjamin Scherrey scherrey@switchco.com
Mon Feb 28 16:16:00 GMT 2000


Thanx for the pointer, Martin. Meanwhile, with some help from a fellow
programmer, I've come up with what should be a compliant solution to
my problem using traits characteristics and template specialization.
Unfortunately, g++ doesn't seem to cope with it and I'm having trouble
determining if my code is at fault or some feature I'm trying to use
simply isn't implemented or is broken. Attached is the revised code
which fails to compile. This time, however, the error message appears
nonsensical because in its "failure to match..." error, the first
candidate it suggests matches exactly!

	Any ideas?

		Ben Scherrey

"Martin v. Loewis" wrote:
> I believe your code is illformed, the instantiation of the template
> Matcher< Test, bool, void > already fails. 14.8.2, [temp.deduct]/2 says
> 
> # ... Type deduction may fail for the following reasons: ...
> # Attempting to create a function type in which a parameter has a type
> # of void.
match.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: match.cpp
Type: text/x-c++
Size: 2192 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20000228/d61fdda0/attachment.bin>


More information about the Gcc mailing list