|
|
От: |
SergioSV
|
|
| Дата: | 01.04.09 11:17 | ||
| Оценка: | |||
An rvalue of type "pointer to cv void" can be explicitly converted to a pointer to object type. A value of type pointer to object converted to “pointer to cv void” and back to the original pointer type will have its original value.
An rvalue of type “pointer to cv1 void” can be converted to an rvalue of type “pointer to cv2 T,” where T is an object type
and cv2 is the same cv-qualification as, or greater cv-qualification than, cv1. A value of type pointer to object converted
to “pointer to cv void” and back, possibly with different cv-qualification, shall have its original value. [ Example:
T* p1 = new T;
const T* p2 = static_cast < const T*>( static_cast < void *>( p1 ));
bool b = p1 == p2 ; / / b will have the value true.
—end example ]
An rvalue of type “pointer to cv1 void” can be converted to an rvalue of type “pointer to cv2 T,” where T is an object type
and cv2 is the same cv-qualification as, or greater cv-qualification than, cv1.