[sigc] sigc::retype does a static_cast?
- From: Philip Langdale <plangdale vmware com>
- To: libsigc-list gnome org
- Subject: [sigc] sigc::retype does a static_cast?
- Date: Wed, 05 Dec 2007 16:49:01 -0800
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]