Text Processing with Boost

Speaker: Eric Niebler


Text Processing with Boost February 2007 meeting of the Northwest C++ Users Group. The abysmal support in the C and C++ standard libraries for string handling has driven many programmers to other languages like Perl and Python. Boost aims to reverse that trend. Libraries such as Boost.Lexical_cast, Boost.String_algo, Boost.Regex, Boost.Xpressive and Boost.Spirit are invaluable tools for slicing and dicing strings. If your task is as simple as turning an integer into a string, or as complicated as developing a parser generator for a new scripting language, Boost has a library that can help. In addition to covering all the afore mentioned libraries from a user’s perspective, we’ll also look at how Boost can be used to get more out of the standard IOstreams, and discover some hidden gems in Boost for dealing with Unicode.

Red Code/Green Code – Generalizing Const

Speaker: Scott Meyers


C++ compilers allow non-const code to call const code, but going the other way requires a cast. In this talk, Scott describes an approach he’s been pursuing to generalize this notion to arbitrary criteria. For example, thread-safe code should only call other thread-safe code (unless you explicitly permit it on a per-call basis). Ditto for exception-safe code, code not “contaminated” by some open source license, or any other constraint you choose. The approach is based on template metaprogramming (TMP), and the implementation uses the Boost metaprogramming library (Boost.MPL), so constraint violations are, wherever possible, detected during compilation.