reinterpret_cast return value

i wanna ask, from this web https://www.geeksforgeeks.org/reinterpret_cast-in-c-type-casting-operators/ it says:


It doesn’t have any return type


but, in the ostream (cout) is calling it as if it has return value:

 
cout << *(reinterpret_cast<bool*>(ch));


anyone can explain?
reinterpret_­cast<T>(e) where T is a type is an expression; it has a result:
"The result of the expression reinterpret_­cast<T>(v) is the result of converting the expression v to type T".
https://eel.is/c++draft/expr.reinterpret.cast#1

More information: https://en.cppreference.com/w/cpp/language/reinterpret_cast

reinterpret_­cast<T>(e) where T is a type is an expression; it has a result:
"The result of the expression reinterpret_­cast<T>(v) is the result of converting the expression v to type T".
https://eel.is/c++draft/expr.reinterpret.cast#1

More information: https://en.cppreference.com/w/cpp/language/reinterpret_cast


so the website has the wrong information?
Last edited on
Yes, it is wrong. That page doesn't seem to be a very good source of information.
ok, thanks guys... so glad i asked you guys...
Topic archived. No new replies allowed.