From Effective c++ book