The comment in SemaCast.cpp says that the second kind deals with C++ 5.2.10p9:<br><br>  <i>An rvalue of type "pointer to member of X of type T1" can be explicitly converted to an rvalue of type "pointer to member of Y of type T2" if T1 and T2 are both function types or both object types.</i><br>

<br>This is the code that I tried<br><br>class X {<br>public:<br>  int a;<br>};<br><br>class Y {<br>public:<br>  int b;<br>};<br><br>int main() {<br>  int X::*xptr = &X::a;<br>  int Y::*yptr = reinterpret_cast<int Y::*>(xptr);<br>

}<br><br><br>On Sat, Jan 5, 2013 at 9:24 PM, Kim Gräsman <<a href="mailto:kim.grasman@gmail.com">kim.grasman@gmail.com</a>> wrote:<br>> Hi all,<br>><br>> In IWYU [1], we traverse the AST trying to deduce if the use of a<br>

> symbol requires a full declaration or if a forward declaration is<br>> sufficient.<br>><br>> One of the things we're looking at are cast-expressions, and there are<br>> two kinds we currently don't cover:<br>

><br>>  CK_BuiltinFnToFnPtr<br>>  CK_ReinterpretMemberPointer<br>><br>> The docstrings for them don't give examples of what they might look<br>> like, and I'm having trouble coming up with representative examples.<br>

> Can anyone help? And maybe add examples to the docstrings for these<br>> two kinds?<br>><br>> Thanks!<br>><br>> - Kim<br>><br>> [1] <a href="http://code.google.com/p/include-what-you-use/">http://code.google.com/p/include-what-you-use/</a><br>

> _______________________________________________<br>> cfe-dev mailing list<br>> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>