C-style casts removed

This is a discussion on C-style casts removed within the C++ Programming forums, part of the General Programming Boards category; Is it true that the old C-style casts are removed from C++ standard or are going to be? I read ...

  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    330

    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
    Posts
    6,287
    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
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    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.

    --
    Mats
    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, 05:23 AM
  3. Which style of if loops is most common?
    By dwks in forum A Brief History of Cprogramming.com
    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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21