亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? safeint.hpp

?? 自定義HttpClient類
?? HPP
?? 第 1 頁 / 共 5 頁
字號:
			throw SafeIntException(ERROR_ARITHMETIC_OVERFLOW);
		}
		++m_int;
		return *this;
	}
	
	//prefix decrement operator
	SafeInt<T>& operator --()
	{
		if(m_int == MinInt())
		{
			throw SafeIntException(ERROR_ARITHMETIC_OVERFLOW);
		}
		--m_int;
		return *this;
	}

	//postfix increment operator
	SafeInt<T> operator ++(int) //dummy arg to comply with spec
	{
		if(m_int == MaxInt())
		{
			throw SafeIntException(ERROR_ARITHMETIC_OVERFLOW);
		}

		SafeInt<T> tmp = m_int;

		m_int++;
		return tmp;
	}

	//postfix decrement operator
	SafeInt<T> operator --(int) //dummy arg to comply with spec
	{
		if(m_int == MinInt())
		{
			throw SafeIntException(ERROR_ARITHMETIC_OVERFLOW);
		}

		SafeInt<T> tmp = m_int;
		m_int--;
		return tmp;
	}

	//one's complement
	//note - this operator will normally change size to an int
	//cast in return improves perf and maintains type
	SafeInt<T> operator ~() const {return SafeInt<T>((T)~m_int);}

	//binary operators
	//
	// arithmetic binary operators
	// % modulus
	// * multiplication
	// / division
	// + addition
	// - subtraction
	//
	// For each of the arithmetic operators, you will need to 
	// use them as follows:
	//
	// SafeInt<char> c = 2;
	// SafeInt<int>  i = 3;
	//
	// SafeInt<int> i2 = i op c.Value();
	// OR
	// SafeInt<char> i2 = i.Value() op c;
	//
	// The base problem is that if the lhs and rhs inputs are different SafeInt types
	// it is not possible in this implementation to determine what type of SafeInt
	// should be returned. You have to let the class know which of the two inputs
	// need to be the return type by forcing the other value to the base integer type.
	// The case of:
	//
	// SafeInt<T> i, j, k;
	// i = j op k;
	//
	// works just fine and no unboxing is needed because the return type is not ambiguous.

	//modulus
	//modulus has some convenient properties - 
	//first, the magnitude of the return can never be
	//larger than the lhs operand, and it must be the same sign
	//as well. It does, however, suffer from the same promotion
	//problems as comparisons, division and other operations
	template <typename U>
	SafeInt<T> operator %(U rhs)
	{
		return MixedSizeModulus(*this, rhs);
	}

	SafeInt<T> operator %(SafeInt<T> rhs)
	{
		if(rhs.Value() == 0)
			throw SafeIntException(EXCEPTION_INT_DIVIDE_BY_ZERO);

		//this is always safe
		return SafeInt<T>((T)(m_int % rhs.Value()));
	}

	//modulus assignment
	template <typename U>
	SafeInt<T>& operator %=(U rhs)
	{
		*this = MixedSizeModulus(*this, rhs);
		return *this;
	}

	template <typename U>
	SafeInt<T>& operator %=(SafeInt<U> rhs)
	{
		*this = MixedSizeModulus(*this, rhs.Value());
		return *this;
	}

	//multiplication
	template <typename U>
	SafeInt<T> operator *(U rhs)
	{
		return MixedSizeMultiply(*this, rhs);
	}

	SafeInt<T> operator *(SafeInt<T> rhs)
	{
		return SafeInt<T>(multiply(m_int, rhs.Value()));
	}

	//multiplication assignment
	SafeInt<T>& operator *=(SafeInt<T> rhs)
	{
		m_int = multiply(rhs.m_int, m_int);
		return *this;
	}

	template <typename U> 
	SafeInt<T>& operator *=(U rhs)
	{
		*this = MixedSizeMultiply(*this, rhs);
		return *this;
	}

	template <typename U> 
	SafeInt<T>& operator *=(SafeInt<U> rhs)
	{
		*this = MixedSizeMultiply(*this, rhs.Value());
		return *this;
	}

	//division
	template <typename U>
	SafeInt<T> operator /(U rhs)
	{
		return MixedSizeDivision(*this, rhs);
	}

	SafeInt<T> operator /(SafeInt<T> rhs)
	{
		return MixedSizeDivision(*this, rhs.Value());
	}

	//division assignment
	SafeInt<T>& operator /=(SafeInt<T> i)
	{
		*this = MixedSizeDivision(*this, i.Value());
		return *this;
	}

	template <typename U> SafeInt<T>& operator /=(U i)
	{
		*this = MixedSizeDivision(*this, i);
		return *this;
	}

	template <typename U> SafeInt<T>& operator /=(SafeInt<U> i)
	{
		*this = MixedSizeDivision(*this, i.Value());
		return *this;
	}

	//for addition and subtraction

	//addition
	inline SafeInt<T> operator +(SafeInt<T> rhs)
	{
		return SafeInt<T>(addition(m_int, rhs.Value()));
	}

	template <typename U>
	inline SafeInt<T> operator +(U rhs)
	{
		return MixedSizeAddition(*this, rhs);
	}

	//addition assignment
	SafeInt<T>& operator +=(SafeInt<T> rhs)
	{
		m_int = addition(m_int, rhs.m_int);
		return *this;
	}

	template <typename U>
	SafeInt<T>& operator +=(U rhs)
	{
		*this = MixedSizeAddition(*this, rhs);
		return *this;
	}

	template <typename U> 
	SafeInt<T>& operator +=(SafeInt<U> rhs)
	{
		*this = MixedSizeAddition(*this, rhs.Value());
		return *this;
	}

	//subtraction
	template <typename U>
	SafeInt<T> operator -(U rhs)
	{
		return MixedSizeSubtraction(*this, rhs);
	}

	SafeInt<T> operator -(SafeInt<T> rhs)
	{
		return SafeInt<T>(subtraction(m_int, rhs.m_int));
	}

	//subtraction assignment
	SafeInt<T>& operator -=(SafeInt<T> rhs)
	{
		m_int = subtraction(m_int, rhs.m_int);
		return *this;
	}

	template <typename U> 
	SafeInt<T>& operator -=(U rhs)
	{
		*this = MixedSizeSubtraction(*this, rhs);
		return *this;
	}

	template <typename U> 
	SafeInt<T>& operator -=(SafeInt<U> rhs)
	{
		*this = MixedSizeSubtraction(*this, rhs.Value());
		return *this;
	}

	//comparison operators
	//additional overloads defined outside the class at the bottom of
	//the header to allow for cases where the SafeInt is the rhs value

	// less than
	template <typename U>
	bool operator <(U rhs)
	{
		return LessThan(m_int, rhs);
	}

	bool operator <(SafeInt<T> rhs)
	{
		return m_int < rhs.m_int;
	}

	//greater than or eq.
	template <typename U>
	bool operator >=(U rhs){return !(*this < rhs);}

	bool operator >=(SafeInt<T> rhs)
	{
		return m_int >= rhs.Value();
	}

	// greater than
	template <typename U>
	bool operator >(U rhs)
	{
		return SafeInt<T>::GreaterThan(m_int, rhs);
	}

	bool operator >(SafeInt<T> rhs)
	{
		return m_int > rhs.m_int;
	}

	//less than or eq.
	template <typename U>
	bool operator <=(U rhs){return !(*this > rhs);}

	//same type - easy path
	bool operator <=(SafeInt<T> rhs)
	{
		return m_int <= rhs.Value();
	}

	//equality
	template <typename U>
	bool operator ==(U rhs){return Equals(m_int, rhs);}

	//need an explicit override for type bool
	bool operator ==(bool rhs)
	{
		return (m_int == 0 ? false : true) == rhs;
	}

	bool operator ==(SafeInt<T> rhs){return m_int == rhs.Value();}

	//!= operators
	template <typename U>
	bool operator !=(U rhs){return !Equals(m_int, rhs);}

	bool operator !=(bool b)
	{
		return (m_int == 0 ? false : true) != b;
	}

	bool operator !=(SafeInt<T> rhs){return m_int != rhs.Value();}

	//shift operators
	//Note - shift operators ALWAYS return the same type as the lhs
	//specific version for SafeInt<T> not needed - 
	//code path is exactly the same as for SafeInt<U> as rhs

	//left shift
	//Also, shifting > bitcount is undefined - trap in debug
	template <typename U> 
	SafeInt<T> operator <<(U bits)
	{
		if(IsSigned(bits))
            assert(bits >= 0);

		assert(bits < BitCount());

		return SafeInt<T>((T)(m_int << bits));
	}

	template <typename U> 
	SafeInt<T> operator <<(SafeInt<U> bits)
	{
		if(IsSigned(bits))
            assert(bits >= 0);

		assert(bits < BitCount());

		return SafeInt<T>((T)(m_int << bits.Value()));
	}

	//left shift assignment

	template <typename U>
	SafeInt<T>& operator <<=(U bits)
	{
		if(IsSigned(bits))
			assert(bits >= 0);

		assert(bits < BitCount());

		m_int <<= bits;
		return *this;
	}

	template <typename U>
	SafeInt<T>& operator <<=(SafeInt<U> bits)
	{
		if(IsSigned(bits))
			assert(bits.Value() >= 0);

		assert(bits.Value() < BitCount());

		m_int <<= bits.Value();
		return *this;
	}

	//right shift
	template <typename U> 
	SafeInt<T> operator >>(U bits)
	{
		if(IsSigned(bits))
            assert(bits >= 0);

		assert(bits < BitCount());

		return SafeInt<T>((T)(m_int >> bits));
	}

	template <typename U> 
	SafeInt<T> operator >>(SafeInt<U> bits)
	{
		if(IsSigned(bits))
            assert(bits >= 0);

		assert(bits < BitCount());

		return SafeInt<T>((T)(m_int >> bits.Value()));
	}

	//right shift assignment
	template <typename U>
	SafeInt<T>& operator >>=(U bits)
	{
		if(IsSigned(bits))
			assert(bits >= 0);

		assert(bits < BitCount());

		m_int >>= bits;
		return *this;
	}

	template <typename U>
	SafeInt<T>& operator >>=(SafeInt<U> bits)
	{
		if(IsSigned(bits))
			assert(bits.Value() >= 0);

		assert(bits.Value() < BitCount());

		m_int >>= bits.Value();
		return *this;
	}

	//bitwise operators
	//this only makes sense if we're dealing with the same type and size
	//demand a type T, or something that fits into a type T

	//bitwise &
	SafeInt<T> operator &(SafeInt<T> rhs)
	{
		return SafeInt<T>((T)(m_int & rhs.m_int));
	}

	template <typename U>
	SafeInt<T> operator &(U rhs)
	{
		//if U can fit into T without truncating, force U to T
		if(sizeof(U) <= sizeof(T))
			return SafeInt<T>(m_int & (T)rhs);

		//might still be safe
		//cast rhs down to a T, then back up to U
		//check to see if it is equal to the original value
		//this allows things like
		//SafeInt<char>(2) & 4 (literal is an int) to work
		if( (U)((T)rhs) == rhs)
			return SafeInt<T>(m_int & (T)rhs);
		
		throw SafeIntException(ERROR_ARITHMETIC_OVERFLOW);

	}

	//bitwise & assignment
	SafeInt<T>& operator &=(SafeInt<T> rhs)
	{
		m_int &= rhs.m_int;
		return *this;
	}

	template <typename U> 
	SafeInt<T>& operator &=(U rhs)
	{
		*this = *this & rhs;
		return *this;
	}

	template <typename U> 
	SafeInt<T>& operator &=(SafeInt<U> rhs)
	{
		*this = *this & rhs.Value();
		return *this;
	}

	//XOR
	SafeInt<T> operator ^(SafeInt<T> rhs)
	{
		return SafeInt<T>((T)(m_int ^ rhs.m_int));
	}

	template <typename U>
	SafeInt<T> operator ^(U rhs)
	{
		//if U can fit into T without truncating, force U to T
		if(sizeof(U) <= sizeof(T))
			return SafeInt<T>(m_int ^ (T)rhs);
		
		if( (U)((T)rhs) == rhs)
			return SafeInt<T>(m_int ^ (T)rhs);

		throw SafeIntException(ERROR_ARITHMETIC_OVERFLOW);

	}

	//XOR assignment
	SafeInt<T>& operator ^=(SafeInt<T> i)
	{
		m_int ^= i.m_int;
		return *this;
	}

	template <typename U> 
	SafeInt<T>& operator ^=(U rhs)
	{
		*this = *this ^ rhs;
		return *this;
	}

	template <typename U> 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品在线免费观看| 日韩国产欧美一区二区三区| 国产精品超碰97尤物18| 精品精品欲导航| 日韩亚洲欧美一区二区三区| 欧美一区2区视频在线观看| 91精品欧美福利在线观看| 3d动漫精品啪啪| 精品日产卡一卡二卡麻豆| 欧美一二三四区在线| 精品美女在线播放| 国产日韩欧美一区二区三区综合 | 亚洲日本在线看| 亚洲欧美综合色| 亚洲成在人线免费| 久久99精品久久久久久动态图| 精品一区二区三区视频在线观看| 日韩电影免费在线| 精品在线一区二区| 久久99国产精品免费网站| 日韩精品亚洲专区| 激情五月激情综合网| 丁香激情综合五月| 在线观看亚洲成人| 欧美一级免费大片| 久久亚洲精精品中文字幕早川悠里 | 欧美午夜精品理论片a级按摩| 欧美性受极品xxxx喷水| 717成人午夜免费福利电影| 欧美精品一区二区三| 欧美国产精品一区| 亚洲国产一二三| 国产美女一区二区| 久久精品国产网站| 国产一区二区三区四区五区美女 | 91蜜桃在线观看| 欧美日韩免费观看一区三区| 国产亚洲精品超碰| 亚洲一区二区中文在线| 蜜臀99久久精品久久久久久软件| 粉嫩av一区二区三区粉嫩| 欧美日本一区二区在线观看| 中文字幕第一区第二区| 日韩精品一二三四| 在线看不卡av| 国产精品久久一级| 九九视频精品免费| 91国产视频在线观看| 国产午夜精品福利| 久久99在线观看| 欧美日韩在线综合| 亚洲图片另类小说| 国产高清成人在线| 97精品国产97久久久久久久久久久久 | 国产日产精品1区| 亚洲mv大片欧洲mv大片精品| 成人免费视频视频在线观看免费| 日韩一二在线观看| 亚洲一区二区在线免费看| 成人一区在线观看| 国产人妖乱国产精品人妖| 蜜臀av亚洲一区中文字幕| 欧洲一区在线电影| 玉米视频成人免费看| 成人免费看黄yyy456| 精品福利一区二区三区 | 久久这里只有精品视频网| 五月开心婷婷久久| 久久老女人爱爱| 婷婷一区二区三区| 白白色亚洲国产精品| 久久精品免费在线观看| 国产一区三区三区| 精品国产不卡一区二区三区| 视频精品一区二区| 91麻豆精品国产综合久久久久久| 一区二区三区精品视频| 91福利国产成人精品照片| 亚洲欧美激情插 | 亚洲一级二级在线| 色噜噜偷拍精品综合在线| 亚洲欧美自拍偷拍色图| 91在线精品秘密一区二区| 亚洲人成网站色在线观看| 91在线云播放| 亚洲精品国产高清久久伦理二区| 日韩二区在线观看| 欧美精品一二三四| 免费成人结看片| 精品免费视频.| 国产馆精品极品| 亚洲欧美偷拍卡通变态| 色综合久久中文字幕| 午夜久久久久久| 久久久久久99精品| 99精品一区二区三区| 亚洲高清免费视频| 欧美精品一区二区久久婷婷 | 欧美性猛交xxxx黑人交| 日日嗨av一区二区三区四区| 欧美精品在线视频| 国产一区二区三区黄视频 | 日本v片在线高清不卡在线观看| 日韩午夜小视频| 成人精品视频.| 亚洲一区二区精品3399| 欧美一级黄色片| av高清久久久| 麻豆成人久久精品二区三区小说| 欧美国产欧美亚州国产日韩mv天天看完整| 一本色道**综合亚洲精品蜜桃冫| 日韩综合小视频| 国产精品国产三级国产| 欧美日韩一区二区欧美激情 | 一区二区久久久| xnxx国产精品| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 国产高清精品网站| 五月天久久比比资源色| 中文字幕中文乱码欧美一区二区| 欧美片在线播放| 91在线观看美女| 国产成人av电影在线播放| 欧美激情一区二区三区全黄 | 国产一区二区三区免费| 亚洲一区二区三区四区不卡| 久久精品视频一区二区三区| 欧美美女bb生活片| 99re这里只有精品6| 国模无码大尺度一区二区三区| 亚洲一区二区五区| 一色桃子久久精品亚洲| 久久夜色精品一区| 91精品国产91久久综合桃花| 色综合久久久网| 不卡大黄网站免费看| 国产剧情一区二区三区| 美日韩黄色大片| 日韩国产欧美三级| 亚洲va天堂va国产va久| 亚洲欧洲三级电影| 国产精品视频看| 久久精品视频在线看| 精品国产精品一区二区夜夜嗨| 欧美丰满一区二区免费视频| 日本丶国产丶欧美色综合| www.成人在线| 91在线视频网址| 成人h动漫精品一区二| 懂色一区二区三区免费观看| 国产精品一二三四五| 狠狠色狠狠色综合| 国产伦精品一区二区三区在线观看| 日本欧美韩国一区三区| 日本成人超碰在线观看| 日韩精品一二三区| 精品亚洲成a人| 国内外精品视频| 国产suv精品一区二区883| 国产成人精品午夜视频免费| 国产精品一区二区久久不卡 | 亚洲美女视频一区| 亚洲精品视频在线看| 一区二区激情视频| 日韩av网站在线观看| 精品一区中文字幕| 懂色中文一区二区在线播放| av不卡一区二区三区| 91精品福利在线| 日韩一区二区三区电影| 久久久久久久久久久久久夜| 中文字幕精品三区| 一区二区三区波多野结衣在线观看| 一区二区三区国产精华| 日韩电影在线观看电影| 韩国三级中文字幕hd久久精品| 国产不卡在线播放| 欧美四级电影网| 精品女同一区二区| 亚洲日本在线a| 蜜桃av噜噜一区| 91色在线porny| 日韩欧美国产一区二区三区| 国产精品女主播av| 亚洲va天堂va国产va久| 国产精品一区二区三区四区| 欧美性大战久久久| 久久亚洲春色中文字幕久久久| 亚洲乱码一区二区三区在线观看| 日日摸夜夜添夜夜添精品视频| 成人免费视频一区二区| 337p亚洲精品色噜噜| 中文字幕中文字幕在线一区 | 国产成人福利片| 欧美三级日韩三级国产三级| 国产日韩欧美综合在线| 性做久久久久久久久| 99re这里只有精品首页| 久久亚洲综合色一区二区三区| 亚洲第一狼人社区|