Tag Archives: caveats

C++ Streams & Typedefs: Be Charful

The C++ typedef keyword is indispensable in many situations, especially for writing portable low-level code. However, in some circumstances it can cause trouble, particularly when it comes to function overloading. Consider the following C++ template class: template <typename T> struct foobar {     foobar( const T foo ) : foo_( foo ) {}   […]