c++/9278: dependent type in conversion operator bug
Wolfgang Bangerth
bangerth@ticam.utexas.edu
Tue Jan 14 00:36:00 GMT 2003
The following reply was made to PR c++/9278; it has been noted by GNATS.
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: David Abrahams <dave@boost-consulting.com>
Cc: "Joseph S. Myers" <jsm28@cam.ac.uk>, <gcc-bugs@gcc.gnu.org>,
<gcc-gnats@gcc.gnu.org>
Subject: Re: c++/9278: dependent type in conversion operator bug
Date: Mon, 13 Jan 2003 18:27:36 -0600 (CST)
> > Indeed a very obscure feature. (Although, I must admit that, I desperately
> > needed something like that not too long ago and had to invent various
> > template metaprogramming hoops to work around...)
>
> I needed exactly that yesterday, which is why it came up ;-)
> Using SFINAE to rule out certain conversions was my game, but it
> didn't fly :(
SFINAE???
In my case, I wanted to make things more uniform in Functor classes: when
you call a function, it either returns a value, or void. So this does not
go together
RETTYPE ret_val = function(args)
if RETTYPE==void. What an annoying difference, and how convenient would it
be if there were "void variables", i.e. objects to which you can assign
the result of a void expression :-)
Some template trickery and specilization can get one around this, however.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth/
More information about the Gcc-prs
mailing list