|
Boost Users : |
From: Peter Foley (pjfoley_at_[hidden])
Date: 2005-08-16 03:48:25
Hi,
"Thorsten Ottosen" <nesotto_at_[hidden]> wrote in message
news:<ddqm49$tjf$1_at_[hidden]>...
>
> what's the difference? A c-style cast is also a const-cast.
>
> -Thorsten
I notice nobody has pointed you in this direction but Scott Meyers in more
Effective C++ discusses in Item 2 ("Prefer C++ style casts") why it is
preferable to use the new C++ style casts. Key points:
* Easier to understand why a cast is happening
* You can explicitly say what you are casting to
* It is much easier to search for exactly where you are casting in
your code
* More fine grained control
I am not a fantastic programmer but I feel that I have learnt a lot from his
books. Out of all the reference/text books that I have purchased I think
these books have been the best.
Peter.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net