VC7.1付属のSTLのauto_ptrのバグ
- 以下のコードのように、コピー(Move)するauto_ptrのelement_typeが異なるとoperator auto_ptr_ref<_Other>()が無限に再帰してスタックがとぶ
- VC8付属のものは直っている
[]#include[] []<memory>[] []// auto_ptr[]
[]std[][]::[][]auto_ptr[][]<[][]int[][]> [][]new_int[][]()[]
[]{[]
[]return[] []std[][]::[][]auto_ptr[][]<[][]int[][]>([][]new[] []int[][]());[]
[]}[]
[]void[] []test[][]()[]
[]{[]
[]std[][]::[][]auto_ptr[][]<[][]int[] []const[][]> [][]ap[][](::[][]new_int[][]());[]
[]}[]