News

Modern C++ Programming with Test-Driven Development -- Jeff Langr

[Ed.: This upcoming book is currently in beta. Thanks Tom for pointing it out!]

 

langr-tdd.pngI have nothing to do with this book other than I've bought the beta book and am enjoying it thus far. It fills a gap in the market very nicely.

Modern C++ Programming with Test-Driven Development: Code Better, Sleep Better

by Jeff Langr, edited by Michael Swaine

If you program in C++ you’ve been neglected. Test-driven development (TDD) is a modern software development practice that can dramatically reduce the number of defects in systems, produce more maintainable code, and give you the confidence to change your software to meet changing needs. But C++ programmers have been ignored by those promoting TDD -- until now. In this book, Jeff Langr gives you hands-on lessons in the challenges and rewards of doing TDD in C++.

Auto: A Necessary Evil? -- Roger Orr

Roger Orr has written about the history and use of auto in ACCU's Overload 115:

Auto -- A Necessary Evil?

by Roger Orr

From the article:

The keyword auto now lets you declare variables where the compiler provides the actual type and the programmer is either unwilling or unable to name the actual type. The keyword can also be used in function definitions to let you provide the return type after the rest of the function declaration, which is useful when the return type depends on the type of the arguments.

As with any new keyword there are questions about usage –- at two levels. First of all, where and how are programmers permitted to use the new feature. Secondly, what guidance is there to sensible adoption of the new feature. I intend to start with by answering the first question and then subsequently focus on the second.

Summer standards papers mailing available

Note: Some of these papers explore potential future standardization directions and alternatives. They do not discuss or propose to amend the C++14 Committee Draft paper whose ballot is currently in progress.

 

The official mid-meeting standards papers mailing is now available. If you are not currently a committee member, please direct discussion about these papers to the public std-proposals forum.

Note: Most or all of these papers have also been posted already to this site’s Standardization RSS feed.

 

WG21 Number Title Author Document Date Mailing Date Previous Version Subgroup Disposition
Every WD change mentioned in any paper in this mailing should be interpreted as a possible future direction, not as a change to the CD currently under ballot.
N3690 Programming Languages - C++ Stefanus Du Toit 2013-05-15 2013-07 N3691    
N3691 Working Draft, Standard for Programming Language C++ Stefanus Du Toit 2013-05-16 2013-07 N3485    
N3692 C++ Editor's Report, October 2012 Stefanus Du Toit 2013-05-16 2013-07      
N3693 Working Draft, Technical Specification -- File System Beman Dawes 2013-06-28 2013-07 N3505 Filesystem  
N3694 Feature-testing recommendations for C++ Clark Nelson 2013-06-27 2013-07   Feature test  
N3695 SG5: Transactional Memory (TM) Meeting Minutes 2013/03/11-2013/06/10 Michael Wong 2013-06-28 2013-07      
N3696 Proposal to extend atomic with priority update functions Bronek Kozicki 2013-06-26 2013-07   Concurrency  
N3697 Business Plan and Convener's Report Herb Sutter 2013-06-25 2013-07      
N3698 July 25-26 Santa Clara SG1 Meeting Announcement and Agenda Hans-J. Boehm 2013-06-30 2013-07      
N3699 A proposal to add a generalized callable negator Tomasz Kamiński 2013-05-27 2013-07   Library  
N3700 Hierarchical Data Structures and Related Concepts for the C++ Standard Library B. Reiter, R. Rivera 2013-06-22 2013-07 N2101 Library  
N3701 Concepts Lite A. Sutton, B. Stroustrup, G. Dos Reis 2013-06-28 2013-07 N3580 Concepts  
N3702 Introducing an optional parameter for mem_fn, which allows to bind an object to its member function Mikhail Semenov 2013-06-28 2013-07   Library  
N3703 Extending std::search to use Additional Searching Algorithms (Version 3) Marshall Clow 2013-06-28 2013-07 N3606 Library  

New paper: N3701, Concepts Lite (2nd revision) -- A. Sutton, B. Stroustrup, G. Dos Reis

Note: This paper explores potential future standardization directions and alternatives. It does not discuss or propose to amend the C++14 Committee Draft paper whose ballot is currently in progress.

 

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3701

Date: 2013-06-28

Concepts Lite (2nd revision)

by A. Sutton, B. Stroustrup, G. Dos Reis

Excerpt:

This paper is in its 2nd revision. There have been a number of substantial
changes, which are summarize here.

  • The syntax of constrained member functions has changed.
  • The syntax of the requires expression has changed.
  • We have introduced syntax for constraining generic lambdas, and using constraints wherever auto is used.
  • We allow the use of overload sets as arguments to constrained functions.
  • The standard wording has been more extensively developed, but does not yet include language for constrained generic lambdas.

This paper is organized like this:

  • Tutorial: introduces the new features specified by Concepts Lite, their core concepts and examples.
  • User’s guide: provides a more extensive discussion of the proposed features and demonstrates the completeness of the constraints mechanism. We also include some high-level discussion of the language mechanics.
  • Discussion: explains what constrains are not. In particular, we try to outline constraint’s relation to concepts and to dispel some common misconceptions about concepts.
  • Design Notes: Notes on the design of terse notation for templates and generic lambdas.
  • Language definition: presents a semi-formal definition of constraints

Boost 1.54.0 released!

Release 1.54.0 of the Boost C++ Libraries is now available.

These open-source libraries work well with the C++ Standard Library, and are usable across a broad spectrum of applications.
The Boost license encourages both commercial and non-commercial use.

This release contains five new libraries and numerous enhancements and bug fixes for existing libraries.

New Libraries:
Log: Logging library, from Andrey Semashev.
TTI: Type Traits Introspection library, from Edward Diener.
Type Erasure: Runtime polymorphism based on concepts.

For details, including download links, see http://www.boost.org/users/news/version_1.54.0

You can also download directly from SourceForge: http://sourceforge.net/projects/boost/files/boost/1.54.0/

To install this release on your system, see http://www.boost.org/doc/libs/release/more/getting_started/index.html

Thanks,

--The Boost release team

C++-fest GoingNative 2013 announced: Sep 4-6, Redmond, WA, USA

gn13.PNGIn his Build talk yesterday, Herb Sutter announced the GoingNative conference will be held again this year, just over two months from now.

Like last year, the conference will be keynoted by Bjarne Stroustrup, and has two solid days dedicated to current and important material about Standard C++ on all compilers and platforms, with talks from the developers of Visual C++, Clang, IBM xlC++, and other compilers. This year, the organizers are also adding a third day with a mix of ISO C++ and Visual C++ specific topics. In-room attendance is limited to about 300 people.

GoingNative 2013 (registration) (announcement video clip)

Keynotes: Bjarne Stroustrup, Herb Sutter

Speakers:

  • Scott Meyers
  • Andrei Alexandrescu (Facebook)
  • Chandler Carruth (Google)
  • Stephan T. Lavavej (Microsoft)
  • Michael Wong (IBM)
  • Sean Parent (Adobe)
  • and more...

This is the only major public C++ event in North America in 2013 that isn't already sold out. Register today!

Scott Meyers speaking at NWC++UG -- July 17, Redmond, WA, USA

In three weeks, Scott Meyers will be giving a free talk at the Northwest C++ Users' Group:

The Universal Reference/Overloading Collision Conundrum

by Scott Meyers

July 17, 2013 at 7:00pm (pizza at 6:45)
Microsoft Campus, Building 40
Redmond, WA, USA

Abstract

To help address the confusion that arises when rvalue references become lvalue references through reference collapsing, Scott Meyers introduced the notion of “universal references.” In this presentation, he builds on this foundation by explaining that overloading functions on rvalue references is sensible and useful, while seemingly similar overloading on universal references yields confusing, unhelpful behavior. But what do you do when you want to write a perfect forwarding function (which requires universal references), yet you want to customize its behavior for certain types? If overloading is off the table, what’s on? In this talk, Scott surveys a variety of options.

Though Scott will give a one-slide overview of the idea behind universal references at the beginning of the presentation, attendees are encouraged to familiarize themselves with the notion in more detail prior to the talk. Links to written and video introductions to universal references are available here.

Bio

Scott Meyers is one of the world’s foremost authorities on C++. He wrote the best-selling Effective C++ series (Effective C++, More Effective C++, and Effective STL); published and maintains the annotated training materials Overview of the New C++ (C++11) and Effective C++ in an Embedded Environment; is Consulting Editor for Addison Wesley’s Effective Software Development Series, and, with Herb Sutter and Andrei Alexandrescu, is a principal in C++ and Beyond. He has a Ph.D in Computer Science from Brown University. He’s currently working on a new book, Effective C++11/14, which he hopes to publish in early 2014.

C++11 Regular Expression Library -- Brian Overland

New at InformIT:

C++11 Regular-Expression Library

by Brian Overland

From the article:

Regular expressions are of practical value in many programs, as they can aid with the task of lexical analysis—intelligently breaking up pieces of an input string—as well as tasks such as converting from one text-file format (such as HTML) to another.

I’ve found that when the C++11 regular expression library is explained in a straightforward, simple manner, it’s easy to use. This chapter doesn’t describe all the endless variations on the regex function-call syntax, but it does explain all the basic functionality: how to do just about anything you’d want to do.