static_cast

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc Schellens

    static_cast

    Can somebody tell me when exactly a static_cast is invalid,
    and when not?

    thanks,
    marc

  • Erik Max Francis

    #2
    Re: static_cast

    Marc Schellens wrote:
    [color=blue]
    > Can somebody tell me when exactly a static_cast is invalid,
    > and when not?[/color]

    It's valid when a well-defined conversion exists, but not when a
    reinterpret_cas t or const_cast would be required.

    But then, this is comp.lang.pytho n :-).

    --
    __ Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
    / \ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
    \__/ Procrastination is the thief of time.
    -- Edward Young

    Comment

    Working...