Web Images Videos Maps News Shopping Gmail more »
Search settings | Sign in
Go to Google Videos home
Scott Meyers @ NWCPP: Red Code/Green Code - Generalizing Const
1:13:36  - 2 years ago
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.
Embed video