code examples I came up with while reading effective c++ book