[sigc] sigc::retype does a static_cast?



Hi all,

So, I was trying to use sigc::retype today and it was failing
in an unexpected way saying that static_cast can't cast away
constness. While this is a completely true statement, the
retype documentation clearly states that:

> sigc::retype() alters a sigc::pointer_functor, a sigc::mem_functor or a sigc::slot in
> that it makes C-style casts to the functor's parameter types of all parameters passed
> through operator()().

and a C-style cast would be able to cast away constness.

So, is this a code or documentation bug? If the code is as intended,
is that for technical reasons? Do we actually want to fail for a const
cast?

Thanks,

--phil


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]