Thread: C-style casts removed

  1. #1
    Registered User
    Join Date
    Jan 2007

    C-style casts removed

    Is it true that the old C-style casts are removed from C++ standard or are going to be?
    I read this somewhere...

  2. #2
    Registered User
    Join Date
    Jun 2005
    Whatever you read is incorrect. C-style casts are not deprecated in the C++ standard.

    However, C-style casts are considered bad style in C++, and their usage is discouraged by practitioners. That means a possibility they might be deprecated by a future version of the C++ standard.

    Note : deprecated means "normative in the current edition of the Standard, but not guaranteed to be part of the Standard in future revisions".

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    Also, C-style casts are often hard to understand in C++, since their meaning is implied by the compiler - C++ style casts are much more explicit in their meaning.

    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  3. Which style of if loops is most common?
    By dwks in forum A Brief History of
    Replies: 38
    Last Post: 08-25-2005, 03:18 PM
  4. WS_EX_COMPOSITED style (double buffering) problems
    By JasonD in forum Windows Programming
    Replies: 2
    Last Post: 10-12-2004, 11:21 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM