Eli Friedman wrote: > On Fri, Sep 26, 2008 at 12:27 PM, Sebastian Redl > <[EMAIL PROTECTED]> wrote: > >> Not really. The standard is pretty clear on this: no pointer to function, no >> matter how many levels of indirection, is allowed in a const_cast. >> > > Take the following code: > typedef int f(int); > f func; > f*const fp = func; > f** fpp = const_cast<f**>(&fp); > > f*const* is a pointer to a const-qualified object type, and f** is a > pointer to the corresponding non-const-qualified type. > True, I forgot that pointers are objects, too. OK, that makes it a bit trickier, but not by much. > Oh, and try to remember to use "Reply to all" when you're writing > responses on this mailing list; reply-to defaults to the sender, not > the list. > The hard part is knowing which of the mailing lists I use work which way.
Sebastian _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
