C++????????Ч????????????
???????????? ???????[ 2013/5/10 9:58:21 ] ????????
??????????????д????????д????????????????ж??????????????????????????
	template<bool A??typename B??typename C>
	struct _if{};
	template<typename B??typename C>
	struct _if<true??B??C>{ typedef B Type; };
	template<typename B??typename C>
	struct _if<false??B??C>{ typedef C Type; };
	template<typename T??size_t N>
	inline size_t ARRAYSIZE(T (&)[N])
	{
	    return N;
	}
	template<typename T>
	struct IsInnerType { static const bool Value = false; };
	template<>
	struct IsInnerType<bool> { static const bool Value = true; };
	template<>
	struct IsInnerType<char> { static const bool Value = true; };
	template<>
	struct IsInnerType<short> { static const bool Value = true; };
	template<>
	struct IsInnerType<int> { static const bool Value = true; };
	template<>
	struct IsInnerType<long long> { static const bool Value = true; };
	template<>
	struct IsInnerType<unsigned char> { static const bool Value = true; };
	template<>
	struct IsInnerType<unsigned short> { static const bool Value = true; };
	template<>
	struct IsInnerType<unsigned int> { static const bool Value = true; };
	template<>
	struct IsInnerType<unsigned long long> { static const bool Value = true; };
	template<typename T??size_t N>
	struct ArrayAssignInnerType
	{
	    static inline void Invoke(T (&A)[N]?? T (&B)[N])
	    {
	        memcpy(A??B??sizeof(A));
	    }
	};
	template<typename T??size_t N>
	struct ArrayAssignCustomType
	{
	    static inline void Invoke(T (&A)[N]?? T (&B)[N])
	    {
	        for(size_t i = 0; i < N; ++i)
	            A[i] = B[i];
	    }
	};
	template<typename T??size_t N>
	inline void ArrayAssign(T (&A)[N]?? T (&B)[N])
	{
	    _if<IsInnerType<T>::Value??ArrayAssignInnerType<T??N>??ArrayAssignCustomType<T??N> >::Type::Invoke(A??B);
	}
??????????????????????????????Ч??????????д??????????????????????????????дOK???
ArrayAssign(B??A);
?????????????VC??GCC?±????????
??????
					
					???·???
App??С????H5?????????????????Щ??
2024/9/11 15:34:34?????????????????????????
2024/9/10 11:13:49P-One ???????????????????????????????????????
2024/9/10 10:14:12???????????????????????????
2024/9/9 18:04:26??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44
					
			
								
								
								
								
								
								
								
								
								
								
				
sales@spasvo.com