Lines Matching refs:details
337 return (details::SafeCastHelper< U, T, in SafeCast()
338 details::SafeIntErrorPolicy_NoThrow >::Cast( From, To ) == SafeIntNoError); in SafeCast()
344 return details::EqualityTest< T, U >::IsEquals( t, u ); in SafeEquals()
350 return !details::EqualityTest< T, U >::IsEquals( t, u ); in SafeNotEquals()
356 return details::GreaterThanTest< T, U >::GreaterThan( t, u ); in SafeGreaterThan()
362 return !details::GreaterThanTest< U, T >::GreaterThan( u, t ); in SafeGreaterThanEquals()
368 return details::GreaterThanTest< U, T >::GreaterThan( u, t ); in SafeLessThan()
374 return !details::GreaterThanTest< T, U >::GreaterThan( t, u ); in SafeLessThanEquals()
380 …return ( details::ModulusHelper< T, U, details::SafeIntErrorPolicy_NoThrow >::Modulus( t, u, resul… in SafeModulus()
386 return ( details::MultiplicationHelper< T, U, in SafeMultiply()
387 details::SafeIntErrorPolicy_NoThrow >::Multiply( t, u, result ) == SafeIntNoError ); in SafeMultiply()
393 return ( details::DivisionHelper< T, U, in SafeDivide()
394 details::SafeIntErrorPolicy_NoThrow >::Divide( t, u, result ) == SafeIntNoError ); in SafeDivide()
400 return ( details::AdditionHelper< T, U, in SafeAdd()
401 details::SafeIntErrorPolicy_NoThrow >::Addition( t, u, result ) == SafeIntNoError ); in SafeAdd()
407 return ( details::SubtractionHelper< T, U, in SafeSubtract()
408 details::SafeIntErrorPolicy_NoThrow >::Subtract( t, u, result ) == SafeIntNoError ); in SafeSubtract()
418 … static_assert( details::NumericType< T >::isInt , "SafeInt<T>: T needs to be an integer type" ); in SafeInt()
427 … static_assert( details::NumericType< T >::isInt , "SafeInt<T>: T needs to be an integer type" ); in throw()
435 … static_assert( details::NumericType< T >::isInt , "SafeInt<T>: T needs to be an integer type" ); in throw()
442 … static_assert( details::NumericType< T >::isInt , "SafeInt<T>: T needs to be an integer type" ); in SafeInt()
449 … static_assert( details::NumericType< T >::isInt , "SafeInt<T>: T needs to be an integer type" ); in SafeInt()
451 details::SafeCastHelper< T, U, E >::Cast( i, m_int ); in SafeInt()
478 details::SafeCastHelper< T, U, E >::Cast( rhs.Ref(), m_int );
498 details::SafeCastHelper< char, T, E >::Cast( m_int, val );
505 details::SafeCastHelper< signed char, T, E >::Cast( m_int, val );
512 details::SafeCastHelper< unsigned char, T, E >::Cast( m_int, val );
519 details::SafeCastHelper< __int16, T, E >::Cast( m_int, val ); in __int16()
526 details::SafeCastHelper< unsigned __int16, T, E >::Cast( m_int, val ); in __int16()
533 details::SafeCastHelper< __int32, T, E >::Cast( m_int, val ); in __int32()
540 details::SafeCastHelper< unsigned __int32, T, E >::Cast( m_int, val ); in __int32()
549 details::SafeCastHelper< long, T, E >::Cast( m_int, val );
556 details::SafeCastHelper< unsigned long, T, E >::Cast( m_int, val );
563 details::SafeCastHelper< __int64, T, E >::Cast( m_int, val ); in __int64()
570 details::SafeCastHelper< unsigned __int64, T, E >::Cast( m_int, val ); in __int64()
578 details::SafeCastHelper< unsigned __int16, T, E >::Cast( m_int, val ); in wchar_t()
605 details::NegationHelper< T, E, details::IntTraits< T >::isSigned >::Negative( m_int, tmp );
612 if( m_int != details::IntTraits< T >::maxInt )
623 if( m_int != details::IntTraits< T >::minInt )
637 if( m_int != details::IntTraits< T >::maxInt )
650 if( m_int != details::IntTraits< T >::minInt )
710 details::ModulusHelper< T, U, E >::Modulus( m_int, rhs, result );
717 details::ModulusHelper< T, T, E >::Modulus( m_int, rhs, result );
725 details::ModulusHelper< T, U, E >::Modulus( m_int, rhs, m_int );
732 details::ModulusHelper< T, U, E >::Modulus( m_int, (U)rhs, m_int );
741 details::MultiplicationHelper< T, U, E >::Multiply( m_int, rhs, ret );
748 details::MultiplicationHelper< T, T, E >::Multiply( m_int, (T)rhs, ret );
755 details::MultiplicationHelper< T, T, E >::Multiply( m_int, (T)rhs, m_int );
762 details::MultiplicationHelper< T, U, E >::Multiply( m_int, rhs, m_int );
769 details::MultiplicationHelper< T, U, E >::Multiply( m_int, rhs.Ref(), m_int );
778 details::DivisionHelper< T, U, E >::Divide( m_int, rhs, ret );
785 details::DivisionHelper< T, T, E >::Divide( m_int, (T)rhs, ret );
792 details::DivisionHelper< T, T, E >::Divide( m_int, (T)i, m_int );
798 details::DivisionHelper< T, U, E >::Divide( m_int, i, m_int );
804 details::DivisionHelper< T, U, E >::Divide( m_int, (U)i, m_int );
814 details::AdditionHelper< T, T, E >::Addition( m_int, (T)rhs, ret );
822 details::AdditionHelper< T, U, E >::Addition( m_int, rhs, ret );
829 details::AdditionHelper< T, T, E >::Addition( m_int, (T)rhs, m_int );
836 details::AdditionHelper< T, U, E >::Addition( m_int, rhs, m_int );
843 details::AdditionHelper< T, U, E >::Addition( m_int, (U)rhs, m_int );
852 details::SubtractionHelper< T, U, E >::Subtract( m_int, rhs, ret );
859 details::SubtractionHelper< T, T, E >::Subtract( m_int, (T)rhs, ret );
866 details::SubtractionHelper< T, T, E >::Subtract( m_int, (T)rhs, m_int );
873 details::SubtractionHelper< T, U, E >::Subtract( m_int, rhs, m_int );
880 details::SubtractionHelper< T, U, E >::Subtract( m_int, (U)rhs, m_int );
892 return details::GreaterThanTest< U, T >::GreaterThan( rhs, m_int );
904 return !details::GreaterThanTest< U, T >::GreaterThan( rhs, m_int ); in throw()
916 return details::GreaterThanTest< T, U >::GreaterThan( m_int, rhs ); in throw()
928 return !details::GreaterThanTest< T, U >::GreaterThan( m_int, rhs );
940 return details::EqualityTest< T, U >::IsEquals( m_int, rhs );
955 return !details::EqualityTest< T, U >::IsEquals( m_int, rhs );
976 _SAFEINT_SHIFT_ASSERT( !details::IntTraits< U >::isSigned || bits >= 0 );
977 _SAFEINT_SHIFT_ASSERT( bits < (int)details::IntTraits< T >::bitCount );
985 _SAFEINT_SHIFT_ASSERT( !details::IntTraits< U >::isSigned || (U)bits >= 0 );
986 _SAFEINT_SHIFT_ASSERT( (U)bits < (int)details::IntTraits< T >::bitCount );
996 _SAFEINT_SHIFT_ASSERT( !details::IntTraits< U >::isSigned || bits >= 0 );
997 _SAFEINT_SHIFT_ASSERT( bits < (int)details::IntTraits< T >::bitCount );
1006 _SAFEINT_SHIFT_ASSERT( !details::IntTraits< U >::isSigned || (U)bits >= 0 );
1007 _SAFEINT_SHIFT_ASSERT( (U)bits < (int)details::IntTraits< T >::bitCount );
1017 _SAFEINT_SHIFT_ASSERT( !details::IntTraits< U >::isSigned || bits >= 0 ); in throw()
1018 _SAFEINT_SHIFT_ASSERT( bits < (int)details::IntTraits< T >::bitCount ); in throw()
1026 _SAFEINT_SHIFT_ASSERT( !details::IntTraits< U >::isSigned || (U)bits >= 0 ); in throw()
1027 _SAFEINT_SHIFT_ASSERT( bits < (int)details::IntTraits< T >::bitCount ); in throw()
1036 _SAFEINT_SHIFT_ASSERT( !details::IntTraits< U >::isSigned || bits >= 0 ); in throw()
1037 _SAFEINT_SHIFT_ASSERT( bits < (int)details::IntTraits< T >::bitCount ); in throw()
1046 _SAFEINT_SHIFT_ASSERT( !details::IntTraits< U >::isSigned || (U)bits >= 0 ); in throw()
1047 _SAFEINT_SHIFT_ASSERT( (U)bits < (int)details::IntTraits< T >::bitCount ); in throw()
1078 return SafeInt< T, E >( details::BinaryAndHelper< T, U >::And( m_int, rhs ) ); in throw()
1091 m_int = details::BinaryAndHelper< T, U >::And( m_int, rhs ); in throw()
1098 m_int = details::BinaryAndHelper< T, U >::And( m_int, (U)rhs ); in throw()
1115 return SafeInt< T, E >( details::BinaryXorHelper< T, U >::Xor( m_int, rhs ) );
1128 m_int = details::BinaryXorHelper< T, U >::Xor( m_int, rhs );
1135 m_int = details::BinaryXorHelper< T, U >::Xor( m_int, (U)rhs );
1148 return SafeInt< T, E >( details::BinaryOrHelper< T, U >::Or( m_int, rhs ) );
1161 m_int = details::BinaryOrHelper< T, U >::Or( m_int, rhs );
1168 m_int = details::BinaryOrHelper< T, U >::Or( m_int, (U)rhs );
1173 …SafeInt< T, E > Min( SafeInt< T, E > test, SafeInt< T, E > floor = SafeInt< T, E >( details::IntTr… in throw()
1179 …SafeInt< T, E > Max( SafeInt< T, E > test, SafeInt< T, E > upper = SafeInt< T, E >( details::IntTr… in throw()
1204 …_SAFEINT_SHIFT_ASSERT( ( ( details::IntTraits<T>::isSigned && bits < (int)details::IntTraits< T >:… in Align()
1205 … || ( !details::IntTraits<T>::isSigned && bits < (int)details::IntTraits< T >::bitCount ) ) && in Align()
1206 bits >= 0 && ( !details::IntTraits<T>::isSigned || m_int > 0 ) ); in Align()
1234 return details::GreaterThanTest< T, U >::GreaterThan( (T)rhs, lhs );
1240 return details::GreaterThanTest< T, U >::GreaterThan( (T)rhs, (U)lhs );
1247 return details::GreaterThanTest< U, T >::GreaterThan( lhs, (T)rhs ); in throw()
1253 return details::GreaterThanTest< T, U >::GreaterThan( (T)lhs, (U)rhs ); in throw()
1260 return !details::GreaterThanTest< T, U >::GreaterThan( (T)rhs, lhs ); in throw()
1266 return !details::GreaterThanTest< U, T >::GreaterThan( (U)rhs, (T)lhs ); in throw()
1273 return !details::GreaterThanTest< U, T >::GreaterThan( lhs, (T)rhs );
1279 return !details::GreaterThanTest< T, U >::GreaterThan( (T)lhs, (U)rhs );
1293 return details::EqualityTest< T, U >::IsEquals((T)rhs, lhs);
1299 return details::EqualityTest< T, U >::IsEquals( (T)lhs, (U)rhs );
1306 return !details::EqualityTest< T, U >::IsEquals( rhs, lhs );
1318 return !details::EqualityTest< T, U >::IsEquals( lhs, rhs );
1332 …if( sizeof(T) == sizeof(U) && details::IntTraits< T >::isSigned == details::IntTraits< U >::isSign…
1336 if( details::IntTraits< T >::isSigned && (T)rhs == -1 )
1353 details::MultiplicationHelper< T, U, E >::Multiply( (T)rhs, lhs, ret );
1363 if( details::DivisionMethod< U, T >::method == details::DivisionState_UnsignedSigned )
1382 if( tmp <= details::IntTraits< T >::maxInt )
1389 if( tmp == (U)details::IntTraits< T >::maxInt + 1 )
1390 return SafeInt< T, E >( details::IntTraits< T >::minInt );
1401 if( details::SafeIntCompare< T, U >::isBothSigned )
1403 if( lhs == details::IntTraits< U >::minInt && (T)rhs == -1 )
1410 return SafeInt< T, E >( (T)( -(T)details::IntTraits< U >::minInt ) );
1420 details::DivisionHelper< U, T, E >::Divide( lhs, (T)rhs, ret );
1430 details::AdditionHelper< T, U, E >::Addition( (T)rhs, lhs, ret );
1439 …details::SubtractionHelper< U, T, E, details::SubtractionMethod2< U, T >::method >::Subtract( lhs,…
1451 details::AdditionHelper< T, U, E >::Addition( lhs, (U)rhs, ret );
1460 details::SubtractionHelper< T, U, E >::Subtract( lhs, (U)rhs, ret );
1469 details::MultiplicationHelper< T, U, E >::Multiply( lhs, (U)rhs, ret );
1478 details::DivisionHelper< T, U, E >::Divide( lhs, (U)rhs, ret );
1487 details::ModulusHelper< T, U, E >::Modulus( lhs, (U)rhs, ret );
1495 lhs = details::BinaryAndHelper< T, U >::And( lhs, (U)rhs ); in throw()
1502 lhs = details::BinaryXorHelper< T, U >::Xor( lhs, (U)rhs );
1509 lhs = details::BinaryOrHelper< T, U >::Or( lhs, (U)rhs );
1557 …static_assert( details::DependentFalse< T >::value, "SafeInt<T>: This operator explicitly not supp…
1564 …static_assert( details::DependentFalse< T >::value, "SafeInt<T>: This operator explicitly not supp…
1571 …static_assert( details::DependentFalse< T >::value, "SafeInt<T>: This operator explicitly not supp…
1578 …static_assert( details::DependentFalse< T >::value, "SafeInt<T>: This operator explicitly not supp…
1585 …static_assert( details::DependentFalse< T >::value, "SafeInt<T>: This operator explicitly not supp…
1592 …static_assert( details::DependentFalse< T >::value, "SafeInt<T>: This operator explicitly not supp…
1599 …static_assert( details::DependentFalse< T >::value, "SafeInt<T>: This operator explicitly not supp…
1606 …static_assert( details::DependentFalse< T >::value, "SafeInt<T>: This operator explicitly not supp…
1617 _SAFEINT_SHIFT_ASSERT( !details::IntTraits< T >::isSigned || (T)bits >= 0 );
1618 _SAFEINT_SHIFT_ASSERT( (T)bits < (int)details::IntTraits< U >::bitCount );
1627 _SAFEINT_SHIFT_ASSERT( !details::IntTraits< T >::isSigned || (T)bits >= 0 ); in throw()
1628 _SAFEINT_SHIFT_ASSERT( (T)bits < (int)details::IntTraits< U >::bitCount ); in throw()
1641 return SafeInt< T, E >( details::BinaryAndHelper< T, U >::And( (T)rhs, lhs ) ); in throw()
1648 return SafeInt< T, E >(details::BinaryXorHelper< T, U >::Xor( (T)rhs, lhs ) );
1655 return SafeInt< T, E >( details::BinaryOrHelper< T, U >::Or( (T)rhs, lhs ) );