21 May 2004
C++0x
The June 2004 C/C++ Users Journal has an article by Herb Sutter on the recent C++ Standards committee meeting. He talks about some of the new extensions to the C++ Standard Library that will be included in the Library Extensions Technical Report 1 (Library TR1) due out later in the year. Vendors should be releasing implementations soon after.
(Most items appear to originate from Boost.)
- shared_ptr and weak_ptr - The reference-counted pointers we've always wanted,
- tuple - Template for creating smart n-ary structures,
- Generalized function pointer - Bindable to any function type,
- Several high-performance hash containers,
- Type traits - Determines types at run-time using has_virtual_destructor, is_const, etc.,
- Regular expression interpreter
Looks like some very nice additions. Some items like the shared_ptr and hash containers are long overdue, but it's gotta be a scarey process changing the language itself in such a way as to not break existing code. Other items like is_const and tuple are clever tools that I'll have to experiment with to get them in my head.
The bad part is that some co-workers will still bitch and complain that I'm using scarey technology such as templates and functors in my code, so adding tuples will just ingratiate myself with them even more. Here's a direct quote from a co-worker arguing against me using STL:
I worked with STL in my previous company and I loved it but ... There are definite advantages of using MFC templates than using STL in our product. MFC templates supprts CArchive that makes our serialization comes [sic] so handy.
Where to begin? I should have anticipated the sh*tstorm that came down when I started using Boost.
- Techniques after using Swift for a month posted by sstrader on 26 August 2015 at 11:41:51 PM
- Some thoughts on Ruby after finishing a week (minus one day) of training posted by sstrader on 15 December 2011 at 8:59:30 PM
- Links on the singleton pattern posted by sstrader on 9 December 2011 at 9:19:50 AM
- Phonebot posted by sstrader on 29 October 2011 at 6:37:05 PM
- The labeled break in Java posted by sstrader on 4 September 2011 at 11:27:56 AM