gdb, c++ & namespaces
Robert Zeh
rzeh@efs-us.com
Thu Jan 15 14:26:00 GMT 2004
Michael Elizabeth Chastain wrote:
>eli> The manual doesn't mention "static type" and "dynamic type" in the
>eli> section that describes "set pruint". I think it should, if this
>eli> terminology is to be widely accepted.
>
>I don't know what the popular usage in the C++ community is.
>I don't want to invent new phrases if there are existing phrases.
>
>I checked "The C++ Programming Language" and it does not have
>any nice phrases to distinguish "the type that the pointer says"
>versus "the type that the object in memory has".
>
>Michael C
>
>
>
I believe "static type" and "dynamic type" are the correct phrases to
use. They correspond nicely to C++'s static_cast and dynamic_cast
operators. They also match Stroustrup's discussion in section 24.2.3 of
"The C++ Programming Language" (3rd edition). He refers to the runtime
types as the dynamic type, and type known at compile time as the static
type.
Robert Zeh
More information about the Gdb
mailing list