28 lines · plain
1#ifndef VECTOR2#define VECTOR3template <bool, typename> struct B;4template <typename _Tp> struct B<true, _Tp> { typedef _Tp type; };5namespace std {6template <typename> struct D {7 8 template <typename _Alloc2> struct F {9 static const bool value = 0;10 };11 12 template <typename _Alloc2>13 typename B<F<_Alloc2>::value, _Alloc2>::type _S_select(_Alloc2);14 template <typename _Alloc2>15 static16 typename B<!F<_Alloc2>::value, _Alloc2>::type _S_select(_Alloc2);17};18template <typename _Alloc>19template <typename _Alloc2>20const bool D<_Alloc>::F<_Alloc2>::value;21 22template <typename> class vector {23public:24 vector(int);25 vector(vector &) : vector(D<bool>::_S_select((bool)0)) {}26};27}28#endif // VECTOR