[C++-sig] implicitly_convertible / virtual base class
achim.domma at syynx.de
Mon Jun 3 21:38:56 CEST 2002
> > TypeError: bad argument type for built-in operation
> > Is the problem that draw expects a 'Drawable&' and no 'Drawable'?
> I don't understand the question. Do you mean "not" ^^ here?
yes I wanted to write 'not'
> If it actually expects Drawable&, then that is your problem. If it expects
> const Drawable& as you wrote above, that's not your problem. Implicit
> conversions produce rvalues, and rvalues cannot bind to non-const
I had to add another conversion I missed bevor, but now it works!!!
I have a lot of ctors with only one argument which should be available for
implicid conversion. Do I have to add a 'implicitly_convertible' for each
one? Wouldn't it make sense to have the possibility to specify at the
def_init function that a certain ctor should be used for implicit
thanks again for your support,
More information about the Cplusplus-sig