#ifndef __CHECK_CAST_GENERATED_H_ #define __CHECK_CAST_GENERATED_H_ /* CAUTION: this file is generated by check_cast.py automatically, don't modify it */ //internal use #ifndef __CHECK_CAST_H_ #error "this file cannot be included directly, please include " check_cast.h " instead" #endif #include #include namespace bsl{ #if __WORDSIZE == 32 template<> inline short check_cast( short value ){ return static_cast(value); } template<> inline long double check_cast( short value ){ return static_cast(value); } template<> inline int check_cast( short value ){ return static_cast(value); } template<> inline double check_cast( short value ){ return static_cast(value); } template<> inline unsigned char check_cast( short value ){ if ( value < 0 ){ throw bsl::UnderflowException()< 255 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( short value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long check_cast( short value ){ return static_cast(value); } template<> inline char check_cast( short value ){ if ( value < -128 ){ throw bsl::UnderflowException()< 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( short value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline float check_cast( short value ){ return static_cast(value); } template<> inline unsigned long check_cast( short value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long long check_cast( short value ){ return static_cast(value); } template<> inline signed char check_cast( short value ){ if ( value < -128 ){ throw bsl::UnderflowException()< 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( short value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline short check_cast( long double value ){ if ( value < -32768.0L ){ throw bsl::UnderflowException()< 32767.0L ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( long double value ){ return static_cast(value); } template<> inline int check_cast( long double value ){ if ( value < -2147483648.0L ){ throw bsl::UnderflowException()< 2147483647.0L ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( long double value ){ return static_cast(value); } template<> inline unsigned char check_cast( long double value ){ if ( value < 0.0L ){ throw bsl::UnderflowException()< 255.0L ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( long double value ){ if ( value < 0.0L ){ throw bsl::UnderflowException()< 18446744073709551615.0L ){ throw bsl::OverflowException()<(value); } template<> inline long check_cast( long double value ){ if ( value < -2147483648.0L ){ throw bsl::UnderflowException()< 2147483647.0L ){ throw bsl::OverflowException()<(value); } template<> inline char check_cast( long double value ){ if ( value < -128.0L ){ throw bsl::UnderflowException()< 127.0L ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( long double value ){ if ( value < 0.0L ){ throw bsl::UnderflowException()< 65535.0L ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( long double value ){ return static_cast(value); } template<> inline unsigned long check_cast( long double value ){ if ( value < 0.0L ){ throw bsl::UnderflowException()< 4294967295.0L ){ throw bsl::OverflowException()<(value); } template<> inline long long check_cast( long double value ){ if ( value < -9223372036854775808.0L ){ throw bsl::UnderflowException()< 9223372036854775807.0L ){ throw bsl::OverflowException()<(value); } template<> inline signed char check_cast( long double value ){ if ( value < -128.0L ){ throw bsl::UnderflowException()< 127.0L ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( long double value ){ if ( value < 0.0L ){ throw bsl::UnderflowException()< 4294967295.0L ){ throw bsl::OverflowException()<(value); } template<> inline short check_cast( int value ){ if ( value < -32768 ){ throw bsl::UnderflowException()< 32767 ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( int value ){ return static_cast(value); } template<> inline int check_cast( int value ){ return static_cast(value); } template<> inline double check_cast( int value ){ return static_cast(value); } template<> inline unsigned char check_cast( int value ){ if ( value < 0 ){ throw bsl::UnderflowException()< 255 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( int value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long check_cast( int value ){ return static_cast(value); } template<> inline char check_cast( int value ){ if ( value < -128 ){ throw bsl::UnderflowException()< 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( int value ){ if ( value < 0 ){ throw bsl::UnderflowException()< 65535 ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( int value ){ return static_cast(value); } template<> inline unsigned long check_cast( int value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long long check_cast( int value ){ return static_cast(value); } template<> inline signed char check_cast( int value ){ if ( value < -128 ){ throw bsl::UnderflowException()< 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( int value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline short check_cast( double value ){ if ( value < -32768.0 ){ throw bsl::UnderflowException()< 32767.0 ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( double value ){ return static_cast(value); } template<> inline int check_cast( double value ){ if ( value < -2147483648.0 ){ throw bsl::UnderflowException()< 2147483647.0 ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( double value ){ #ifdef __arm__ volatile uint64_t tmp = *(volatile uint64_t *)&value; return *(double *)(&tmp); #else return static_cast(value); #endif } template<> inline unsigned char check_cast( double value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 255.0 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( double value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 18446744073709551615.0 ){ throw bsl::OverflowException()<(value); } template<> inline long check_cast( double value ){ if ( value < -2147483648.0 ){ throw bsl::UnderflowException()< 2147483647.0 ){ throw bsl::OverflowException()<(value); } template<> inline char check_cast( double value ){ if ( value < -128.0 ){ throw bsl::UnderflowException()< 127.0 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( double value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 65535.0 ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( double value ){ return static_cast(value); } template<> inline unsigned long check_cast( double value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 4294967295.0 ){ throw bsl::OverflowException()<(value); } template<> inline long long check_cast( double value ){ if ( value < -9223372036854775808.0 ){ throw bsl::UnderflowException()< 9223372036854775807.0 ){ throw bsl::OverflowException()<(value); } template<> inline signed char check_cast( double value ){ if ( value < -128.0 ){ throw bsl::UnderflowException()< 127.0 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( double value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 4294967295.0 ){ throw bsl::OverflowException()<(value); } template<> inline short check_cast( unsigned char value ){ return static_cast(value); } template<> inline long double check_cast( unsigned char value ){ return static_cast(value); } template<> inline int check_cast( unsigned char value ){ return static_cast(value); } template<> inline double check_cast( unsigned char value ){ return static_cast(value); } template<> inline unsigned char check_cast( unsigned char value ){ return static_cast(value); } template<> inline unsigned long long check_cast( unsigned char value ){ return static_cast(value); } template<> inline long check_cast( unsigned char value ){ return static_cast(value); } template<> inline char check_cast( unsigned char value ){ if ( value > 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( unsigned char value ){ return static_cast(value); } template<> inline float check_cast( unsigned char value ){ return static_cast(value); } template<> inline unsigned long check_cast( unsigned char value ){ return static_cast(value); } template<> inline long long check_cast( unsigned char value ){ return static_cast(value); } template<> inline signed char check_cast( unsigned char value ){ if ( value > 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( unsigned char value ){ return static_cast(value); } template<> inline short check_cast( unsigned long long value ){ if ( value > 32767ULL ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( unsigned long long value ){ return static_cast(value); } template<> inline int check_cast( unsigned long long value ){ if ( value > 2147483647ULL ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( unsigned long long value ){ return static_cast(value); } template<> inline unsigned char check_cast( unsigned long long value ){ if ( value > 255ULL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( unsigned long long value ){ return static_cast(value); } template<> inline long check_cast( unsigned long long value ){ if ( value > 2147483647ULL ){ throw bsl::OverflowException()<(value); } template<> inline char check_cast( unsigned long long value ){ if ( value > 127ULL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( unsigned long long value ){ if ( value > 65535ULL ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( unsigned long long value ){ return static_cast(value); } template<> inline unsigned long check_cast( unsigned long long value ){ if ( value > 4294967295ULL ){ throw bsl::OverflowException()<(value); } template<> inline long long check_cast( unsigned long long value ){ if ( value > 9223372036854775807ULL ){ throw bsl::OverflowException()<(value); } template<> inline signed char check_cast( unsigned long long value ){ if ( value > 127ULL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( unsigned long long value ){ if ( value > 4294967295ULL ){ throw bsl::OverflowException()<(value); } template<> inline short check_cast( long value ){ if ( value < -32768L ){ throw bsl::UnderflowException()< 32767L ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( long value ){ return static_cast(value); } template<> inline int check_cast( long value ){ return static_cast(value); } template<> inline double check_cast( long value ){ return static_cast(value); } template<> inline unsigned char check_cast( long value ){ if ( value < 0L ){ throw bsl::UnderflowException()< 255L ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( long value ){ if ( value < 0L ){ throw bsl::UnderflowException()<(value); } template<> inline long check_cast( long value ){ return static_cast(value); } template<> inline char check_cast( long value ){ if ( value < -128L ){ throw bsl::UnderflowException()< 127L ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( long value ){ if ( value < 0L ){ throw bsl::UnderflowException()< 65535L ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( long value ){ return static_cast(value); } template<> inline unsigned long check_cast( long value ){ if ( value < 0L ){ throw bsl::UnderflowException()<(value); } template<> inline long long check_cast( long value ){ return static_cast(value); } template<> inline signed char check_cast( long value ){ if ( value < -128L ){ throw bsl::UnderflowException()< 127L ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( long value ){ if ( value < 0L ){ throw bsl::UnderflowException()<(value); } template<> inline short check_cast( char value ){ return static_cast(value); } template<> inline long double check_cast( char value ){ return static_cast(value); } template<> inline int check_cast( char value ){ return static_cast(value); } template<> inline double check_cast( char value ){ return static_cast(value); } template<> inline unsigned char check_cast( char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline unsigned long long check_cast( char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long check_cast( char value ){ return static_cast(value); } template<> inline char check_cast( char value ){ return static_cast(value); } template<> inline unsigned short check_cast( char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline float check_cast( char value ){ return static_cast(value); } template<> inline unsigned long check_cast( char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long long check_cast( char value ){ return static_cast(value); } template<> inline signed char check_cast( char value ){ return static_cast(value); } template<> inline unsigned int check_cast( char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline short check_cast( unsigned short value ){ if ( value > 32767 ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( unsigned short value ){ return static_cast(value); } template<> inline int check_cast( unsigned short value ){ return static_cast(value); } template<> inline double check_cast( unsigned short value ){ return static_cast(value); } template<> inline unsigned char check_cast( unsigned short value ){ if ( value > 255 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( unsigned short value ){ return static_cast(value); } template<> inline long check_cast( unsigned short value ){ return static_cast(value); } template<> inline char check_cast( unsigned short value ){ if ( value > 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( unsigned short value ){ return static_cast(value); } template<> inline float check_cast( unsigned short value ){ return static_cast(value); } template<> inline unsigned long check_cast( unsigned short value ){ return static_cast(value); } template<> inline long long check_cast( unsigned short value ){ return static_cast(value); } template<> inline signed char check_cast( unsigned short value ){ if ( value > 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( unsigned short value ){ return static_cast(value); } template<> inline short check_cast( float value ){ if ( value < -32768.0 ){ throw bsl::UnderflowException()< 32767.0 ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( float value ){ return static_cast(value); } template<> inline int check_cast( float value ){ if ( value < -2147483648.0 ){ throw bsl::UnderflowException()< 2147483647.0 ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( float value ){ return static_cast(value); } template<> inline unsigned char check_cast( float value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 255.0 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( float value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 18446744073709551615.0 ){ throw bsl::OverflowException()<(value); } template<> inline long check_cast( float value ){ if ( value < -2147483648.0 ){ throw bsl::UnderflowException()< 2147483647.0 ){ throw bsl::OverflowException()<(value); } template<> inline char check_cast( float value ){ if ( value < -128.0 ){ throw bsl::UnderflowException()< 127.0 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( float value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 65535.0 ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( float value ){ #ifdef __arm__ volatile uint32_t tmp = *(volatile uint32_t *)&value; return *(float *)&tmp; #else return static_cast(value); #endif } template<> inline unsigned long check_cast( float value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 4294967295.0 ){ throw bsl::OverflowException()<(value); } template<> inline long long check_cast( float value ){ if ( value < -9223372036854775808.0 ){ throw bsl::UnderflowException()< 9223372036854775807.0 ){ throw bsl::OverflowException()<(value); } template<> inline signed char check_cast( float value ){ if ( value < -128.0 ){ throw bsl::UnderflowException()< 127.0 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( float value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 4294967295.0 ){ throw bsl::OverflowException()<(value); } template<> inline short check_cast( unsigned long value ){ if ( value > 32767UL ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( unsigned long value ){ return static_cast(value); } template<> inline int check_cast( unsigned long value ){ if ( value > 2147483647UL ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( unsigned long value ){ return static_cast(value); } template<> inline unsigned char check_cast( unsigned long value ){ if ( value > 255UL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( unsigned long value ){ return static_cast(value); } template<> inline long check_cast( unsigned long value ){ if ( value > 2147483647UL ){ throw bsl::OverflowException()<(value); } template<> inline char check_cast( unsigned long value ){ if ( value > 127UL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( unsigned long value ){ if ( value > 65535UL ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( unsigned long value ){ return static_cast(value); } template<> inline unsigned long check_cast( unsigned long value ){ return static_cast(value); } template<> inline long long check_cast( unsigned long value ){ return static_cast(value); } template<> inline signed char check_cast( unsigned long value ){ if ( value > 127UL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( unsigned long value ){ return static_cast(value); } template<> inline short check_cast( long long value ){ if ( value < -32768LL ){ throw bsl::UnderflowException()< 32767LL ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( long long value ){ return static_cast(value); } template<> inline int check_cast( long long value ){ if ( value < -2147483648LL ){ throw bsl::UnderflowException()< 2147483647LL ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( long long value ){ return static_cast(value); } template<> inline unsigned char check_cast( long long value ){ if ( value < 0LL ){ throw bsl::UnderflowException()< 255LL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( long long value ){ if ( value < 0LL ){ throw bsl::UnderflowException()<(value); } template<> inline long check_cast( long long value ){ if ( value < -2147483648LL ){ throw bsl::UnderflowException()< 2147483647LL ){ throw bsl::OverflowException()<(value); } template<> inline char check_cast( long long value ){ if ( value < -128LL ){ throw bsl::UnderflowException()< 127LL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( long long value ){ if ( value < 0LL ){ throw bsl::UnderflowException()< 65535LL ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( long long value ){ return static_cast(value); } template<> inline unsigned long check_cast( long long value ){ if ( value < 0LL ){ throw bsl::UnderflowException()< 4294967295LL ){ throw bsl::OverflowException()<(value); } template<> inline long long check_cast( long long value ){ return static_cast(value); } template<> inline signed char check_cast( long long value ){ if ( value < -128LL ){ throw bsl::UnderflowException()< 127LL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( long long value ){ if ( value < 0LL ){ throw bsl::UnderflowException()< 4294967295LL ){ throw bsl::OverflowException()<(value); } template<> inline short check_cast( signed char value ){ return static_cast(value); } template<> inline long double check_cast( signed char value ){ return static_cast(value); } template<> inline int check_cast( signed char value ){ return static_cast(value); } template<> inline double check_cast( signed char value ){ return static_cast(value); } template<> inline unsigned char check_cast( signed char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline unsigned long long check_cast( signed char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long check_cast( signed char value ){ return static_cast(value); } template<> inline char check_cast( signed char value ){ return static_cast(value); } template<> inline unsigned short check_cast( signed char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline float check_cast( signed char value ){ return static_cast(value); } template<> inline unsigned long check_cast( signed char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long long check_cast( signed char value ){ return static_cast(value); } template<> inline signed char check_cast( signed char value ){ return static_cast(value); } template<> inline unsigned int check_cast( signed char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline short check_cast( unsigned int value ){ if ( value > 32767U ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( unsigned int value ){ return static_cast(value); } template<> inline int check_cast( unsigned int value ){ if ( value > 2147483647U ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( unsigned int value ){ return static_cast(value); } template<> inline unsigned char check_cast( unsigned int value ){ if ( value > 255U ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( unsigned int value ){ return static_cast(value); } template<> inline long check_cast( unsigned int value ){ if ( value > 2147483647U ){ throw bsl::OverflowException()<(value); } template<> inline char check_cast( unsigned int value ){ if ( value > 127U ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( unsigned int value ){ if ( value > 65535U ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( unsigned int value ){ return static_cast(value); } template<> inline unsigned long check_cast( unsigned int value ){ return static_cast(value); } template<> inline long long check_cast( unsigned int value ){ return static_cast(value); } template<> inline signed char check_cast( unsigned int value ){ if ( value > 127U ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( unsigned int value ){ return static_cast(value); } #else template<> inline short check_cast( short value ){ return static_cast(value); } template<> inline long double check_cast( short value ){ return static_cast(value); } template<> inline int check_cast( short value ){ return static_cast(value); } template<> inline double check_cast( short value ){ return static_cast(value); } template<> inline unsigned char check_cast( short value ){ if ( value < 0 ){ throw bsl::UnderflowException()< 255 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( short value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long check_cast( short value ){ return static_cast(value); } template<> inline char check_cast( short value ){ if ( value < -128 ){ throw bsl::UnderflowException()< 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( short value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline float check_cast( short value ){ return static_cast(value); } template<> inline unsigned long check_cast( short value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long long check_cast( short value ){ return static_cast(value); } template<> inline signed char check_cast( short value ){ if ( value < -128 ){ throw bsl::UnderflowException()< 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( short value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline short check_cast( long double value ){ if ( value < -32768.0L ){ throw bsl::UnderflowException()< 32767.0L ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( long double value ){ return static_cast(value); } template<> inline int check_cast( long double value ){ if ( value < -2147483648.0L ){ throw bsl::UnderflowException()< 2147483647.0L ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( long double value ){ return static_cast(value); } template<> inline unsigned char check_cast( long double value ){ if ( value < 0.0L ){ throw bsl::UnderflowException()< 255.0L ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( long double value ){ if ( value < 0.0L ){ throw bsl::UnderflowException()< 18446744073709551615.0L ){ throw bsl::OverflowException()<(value); } template<> inline long check_cast( long double value ){ if ( value < -9223372036854775808.0L ){ throw bsl::UnderflowException()< 9223372036854775807.0L ){ throw bsl::OverflowException()<(value); } template<> inline char check_cast( long double value ){ if ( value < -128.0L ){ throw bsl::UnderflowException()< 127.0L ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( long double value ){ if ( value < 0.0L ){ throw bsl::UnderflowException()< 65535.0L ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( long double value ){ return static_cast(value); } template<> inline unsigned long check_cast( long double value ){ if ( value < 0.0L ){ throw bsl::UnderflowException()< 18446744073709551615.0L ){ throw bsl::OverflowException()<(value); } template<> inline long long check_cast( long double value ){ if ( value < -9223372036854775808.0L ){ throw bsl::UnderflowException()< 9223372036854775807.0L ){ throw bsl::OverflowException()<(value); } template<> inline signed char check_cast( long double value ){ if ( value < -128.0L ){ throw bsl::UnderflowException()< 127.0L ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( long double value ){ if ( value < 0.0L ){ throw bsl::UnderflowException()< 4294967295.0L ){ throw bsl::OverflowException()<(value); } template<> inline short check_cast( int value ){ if ( value < -32768 ){ throw bsl::UnderflowException()< 32767 ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( int value ){ return static_cast(value); } template<> inline int check_cast( int value ){ return static_cast(value); } template<> inline double check_cast( int value ){ return static_cast(value); } template<> inline unsigned char check_cast( int value ){ if ( value < 0 ){ throw bsl::UnderflowException()< 255 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( int value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long check_cast( int value ){ return static_cast(value); } template<> inline char check_cast( int value ){ if ( value < -128 ){ throw bsl::UnderflowException()< 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( int value ){ if ( value < 0 ){ throw bsl::UnderflowException()< 65535 ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( int value ){ return static_cast(value); } template<> inline unsigned long check_cast( int value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long long check_cast( int value ){ return static_cast(value); } template<> inline signed char check_cast( int value ){ if ( value < -128 ){ throw bsl::UnderflowException()< 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( int value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline short check_cast( double value ){ if ( value < -32768.0 ){ throw bsl::UnderflowException()< 32767.0 ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( double value ){ return static_cast(value); } template<> inline int check_cast( double value ){ if ( value < -2147483648.0 ){ throw bsl::UnderflowException()< 2147483647.0 ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( double value ){ return static_cast(value); } template<> inline unsigned char check_cast( double value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 255.0 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( double value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 18446744073709551615.0 ){ throw bsl::OverflowException()<(value); } template<> inline long check_cast( double value ){ if ( value < -9223372036854775808.0 ){ throw bsl::UnderflowException()< 9223372036854775807.0 ){ throw bsl::OverflowException()<(value); } template<> inline char check_cast( double value ){ if ( value < -128.0 ){ throw bsl::UnderflowException()< 127.0 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( double value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 65535.0 ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( double value ){ return static_cast(value); } template<> inline unsigned long check_cast( double value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 18446744073709551615.0 ){ throw bsl::OverflowException()<(value); } template<> inline long long check_cast( double value ){ if ( value < -9223372036854775808.0 ){ throw bsl::UnderflowException()< 9223372036854775807.0 ){ throw bsl::OverflowException()<(value); } template<> inline signed char check_cast( double value ){ if ( value < -128.0 ){ throw bsl::UnderflowException()< 127.0 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( double value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 4294967295.0 ){ throw bsl::OverflowException()<(value); } template<> inline short check_cast( unsigned char value ){ return static_cast(value); } template<> inline long double check_cast( unsigned char value ){ return static_cast(value); } template<> inline int check_cast( unsigned char value ){ return static_cast(value); } template<> inline double check_cast( unsigned char value ){ return static_cast(value); } template<> inline unsigned char check_cast( unsigned char value ){ return static_cast(value); } template<> inline unsigned long long check_cast( unsigned char value ){ return static_cast(value); } template<> inline long check_cast( unsigned char value ){ return static_cast(value); } template<> inline char check_cast( unsigned char value ){ if ( value > 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( unsigned char value ){ return static_cast(value); } template<> inline float check_cast( unsigned char value ){ return static_cast(value); } template<> inline unsigned long check_cast( unsigned char value ){ return static_cast(value); } template<> inline long long check_cast( unsigned char value ){ return static_cast(value); } template<> inline signed char check_cast( unsigned char value ){ if ( value > 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( unsigned char value ){ return static_cast(value); } template<> inline short check_cast( unsigned long long value ){ if ( value > 32767ULL ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( unsigned long long value ){ return static_cast(value); } template<> inline int check_cast( unsigned long long value ){ if ( value > 2147483647ULL ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( unsigned long long value ){ return static_cast(value); } template<> inline unsigned char check_cast( unsigned long long value ){ if ( value > 255ULL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( unsigned long long value ){ return static_cast(value); } template<> inline long check_cast( unsigned long long value ){ if ( value > 9223372036854775807ULL ){ throw bsl::OverflowException()<(value); } template<> inline char check_cast( unsigned long long value ){ if ( value > 127ULL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( unsigned long long value ){ if ( value > 65535ULL ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( unsigned long long value ){ return static_cast(value); } template<> inline unsigned long check_cast( unsigned long long value ){ return static_cast(value); } template<> inline long long check_cast( unsigned long long value ){ if ( value > 9223372036854775807ULL ){ throw bsl::OverflowException()<(value); } template<> inline signed char check_cast( unsigned long long value ){ if ( value > 127ULL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( unsigned long long value ){ if ( value > 4294967295ULL ){ throw bsl::OverflowException()<(value); } template<> inline short check_cast( long value ){ if ( value < -32768L ){ throw bsl::UnderflowException()< 32767L ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( long value ){ return static_cast(value); } template<> inline int check_cast( long value ){ if ( value < -2147483648L ){ throw bsl::UnderflowException()< 2147483647L ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( long value ){ return static_cast(value); } template<> inline unsigned char check_cast( long value ){ if ( value < 0L ){ throw bsl::UnderflowException()< 255L ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( long value ){ if ( value < 0L ){ throw bsl::UnderflowException()<(value); } template<> inline long check_cast( long value ){ return static_cast(value); } template<> inline char check_cast( long value ){ if ( value < -128L ){ throw bsl::UnderflowException()< 127L ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( long value ){ if ( value < 0L ){ throw bsl::UnderflowException()< 65535L ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( long value ){ return static_cast(value); } template<> inline unsigned long check_cast( long value ){ if ( value < 0L ){ throw bsl::UnderflowException()<(value); } template<> inline long long check_cast( long value ){ return static_cast(value); } template<> inline signed char check_cast( long value ){ if ( value < -128L ){ throw bsl::UnderflowException()< 127L ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( long value ){ if ( value < 0L ){ throw bsl::UnderflowException()< 4294967295L ){ throw bsl::OverflowException()<(value); } template<> inline short check_cast( char value ){ return static_cast(value); } template<> inline long double check_cast( char value ){ return static_cast(value); } template<> inline int check_cast( char value ){ return static_cast(value); } template<> inline double check_cast( char value ){ return static_cast(value); } template<> inline unsigned char check_cast( char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline unsigned long long check_cast( char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long check_cast( char value ){ return static_cast(value); } template<> inline char check_cast( char value ){ return static_cast(value); } template<> inline unsigned short check_cast( char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline float check_cast( char value ){ return static_cast(value); } template<> inline unsigned long check_cast( char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long long check_cast( char value ){ return static_cast(value); } template<> inline signed char check_cast( char value ){ return static_cast(value); } template<> inline unsigned int check_cast( char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline short check_cast( unsigned short value ){ if ( value > 32767 ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( unsigned short value ){ return static_cast(value); } template<> inline int check_cast( unsigned short value ){ return static_cast(value); } template<> inline double check_cast( unsigned short value ){ return static_cast(value); } template<> inline unsigned char check_cast( unsigned short value ){ if ( value > 255 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( unsigned short value ){ return static_cast(value); } template<> inline long check_cast( unsigned short value ){ return static_cast(value); } template<> inline char check_cast( unsigned short value ){ if ( value > 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( unsigned short value ){ return static_cast(value); } template<> inline float check_cast( unsigned short value ){ return static_cast(value); } template<> inline unsigned long check_cast( unsigned short value ){ return static_cast(value); } template<> inline long long check_cast( unsigned short value ){ return static_cast(value); } template<> inline signed char check_cast( unsigned short value ){ if ( value > 127 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( unsigned short value ){ return static_cast(value); } template<> inline short check_cast( float value ){ if ( value < -32768.0 ){ throw bsl::UnderflowException()< 32767.0 ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( float value ){ return static_cast(value); } template<> inline int check_cast( float value ){ if ( value < -2147483648.0 ){ throw bsl::UnderflowException()< 2147483647.0 ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( float value ){ return static_cast(value); } template<> inline unsigned char check_cast( float value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 255.0 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( float value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 18446744073709551615.0 ){ throw bsl::OverflowException()<(value); } template<> inline long check_cast( float value ){ if ( value < -9223372036854775808.0 ){ throw bsl::UnderflowException()< 9223372036854775807.0 ){ throw bsl::OverflowException()<(value); } template<> inline char check_cast( float value ){ if ( value < -128.0 ){ throw bsl::UnderflowException()< 127.0 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( float value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 65535.0 ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( float value ){ return static_cast(value); } template<> inline unsigned long check_cast( float value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 18446744073709551615.0 ){ throw bsl::OverflowException()<(value); } template<> inline long long check_cast( float value ){ if ( value < -9223372036854775808.0 ){ throw bsl::UnderflowException()< 9223372036854775807.0 ){ throw bsl::OverflowException()<(value); } template<> inline signed char check_cast( float value ){ if ( value < -128.0 ){ throw bsl::UnderflowException()< 127.0 ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( float value ){ if ( value < 0.0 ){ throw bsl::UnderflowException()< 4294967295.0 ){ throw bsl::OverflowException()<(value); } template<> inline short check_cast( unsigned long value ){ if ( value > 32767UL ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( unsigned long value ){ return static_cast(value); } template<> inline int check_cast( unsigned long value ){ if ( value > 2147483647UL ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( unsigned long value ){ return static_cast(value); } template<> inline unsigned char check_cast( unsigned long value ){ if ( value > 255UL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( unsigned long value ){ return static_cast(value); } template<> inline long check_cast( unsigned long value ){ if ( value > 9223372036854775807UL ){ throw bsl::OverflowException()<(value); } template<> inline char check_cast( unsigned long value ){ if ( value > 127UL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( unsigned long value ){ if ( value > 65535UL ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( unsigned long value ){ return static_cast(value); } template<> inline unsigned long check_cast( unsigned long value ){ return static_cast(value); } template<> inline long long check_cast( unsigned long value ){ if ( value > 9223372036854775807UL ){ throw bsl::OverflowException()<(value); } template<> inline signed char check_cast( unsigned long value ){ if ( value > 127UL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( unsigned long value ){ if ( value > 4294967295UL ){ throw bsl::OverflowException()<(value); } template<> inline short check_cast( long long value ){ if ( value < -32768LL ){ throw bsl::UnderflowException()< 32767LL ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( long long value ){ return static_cast(value); } template<> inline int check_cast( long long value ){ if ( value < -2147483648LL ){ throw bsl::UnderflowException()< 2147483647LL ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( long long value ){ return static_cast(value); } template<> inline unsigned char check_cast( long long value ){ if ( value < 0LL ){ throw bsl::UnderflowException()< 255LL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( long long value ){ if ( value < 0LL ){ throw bsl::UnderflowException()<(value); } template<> inline long check_cast( long long value ){ return static_cast(value); } template<> inline char check_cast( long long value ){ if ( value < -128LL ){ throw bsl::UnderflowException()< 127LL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( long long value ){ if ( value < 0LL ){ throw bsl::UnderflowException()< 65535LL ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( long long value ){ return static_cast(value); } template<> inline unsigned long check_cast( long long value ){ if ( value < 0LL ){ throw bsl::UnderflowException()<(value); } template<> inline long long check_cast( long long value ){ return static_cast(value); } template<> inline signed char check_cast( long long value ){ if ( value < -128LL ){ throw bsl::UnderflowException()< 127LL ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( long long value ){ if ( value < 0LL ){ throw bsl::UnderflowException()< 4294967295LL ){ throw bsl::OverflowException()<(value); } template<> inline short check_cast( signed char value ){ return static_cast(value); } template<> inline long double check_cast( signed char value ){ return static_cast(value); } template<> inline int check_cast( signed char value ){ return static_cast(value); } template<> inline double check_cast( signed char value ){ return static_cast(value); } template<> inline unsigned char check_cast( signed char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline unsigned long long check_cast( signed char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long check_cast( signed char value ){ return static_cast(value); } template<> inline char check_cast( signed char value ){ return static_cast(value); } template<> inline unsigned short check_cast( signed char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline float check_cast( signed char value ){ return static_cast(value); } template<> inline unsigned long check_cast( signed char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline long long check_cast( signed char value ){ return static_cast(value); } template<> inline signed char check_cast( signed char value ){ return static_cast(value); } template<> inline unsigned int check_cast( signed char value ){ if ( value < 0 ){ throw bsl::UnderflowException()<(value); } template<> inline short check_cast( unsigned int value ){ if ( value > 32767U ){ throw bsl::OverflowException()<(value); } template<> inline long double check_cast( unsigned int value ){ return static_cast(value); } template<> inline int check_cast( unsigned int value ){ if ( value > 2147483647U ){ throw bsl::OverflowException()<(value); } template<> inline double check_cast( unsigned int value ){ return static_cast(value); } template<> inline unsigned char check_cast( unsigned int value ){ if ( value > 255U ){ throw bsl::OverflowException()<(value); } template<> inline unsigned long long check_cast( unsigned int value ){ return static_cast(value); } template<> inline long check_cast( unsigned int value ){ return static_cast(value); } template<> inline char check_cast( unsigned int value ){ if ( value > 127U ){ throw bsl::OverflowException()<(value); } template<> inline unsigned short check_cast( unsigned int value ){ if ( value > 65535U ){ throw bsl::OverflowException()<(value); } template<> inline float check_cast( unsigned int value ){ return static_cast(value); } template<> inline unsigned long check_cast( unsigned int value ){ return static_cast(value); } template<> inline long long check_cast( unsigned int value ){ return static_cast(value); } template<> inline signed char check_cast( unsigned int value ){ if ( value > 127U ){ throw bsl::OverflowException()<(value); } template<> inline unsigned int check_cast( unsigned int value ){ return static_cast(value); } #endif template<> inline bool check_cast( short value ){ return static_cast(value); } template<> inline bool check_cast( long double value ){ return static_cast(value); } template<> inline bool check_cast( int value ){ return static_cast(value); } template<> inline bool check_cast( double value ){ return static_cast(value); } template<> inline bool check_cast( unsigned char value ){ return static_cast(value); } template<> inline bool check_cast( unsigned long long value ){ return static_cast(value); } template<> inline bool check_cast( long value ){ return static_cast(value); } template<> inline bool check_cast( char value ){ return static_cast(value); } template<> inline bool check_cast( unsigned short value ){ return static_cast(value); } template<> inline bool check_cast( float value ){ return static_cast(value); } template<> inline bool check_cast( unsigned long value ){ return static_cast(value); } template<> inline bool check_cast( long long value ){ return static_cast(value); } template<> inline bool check_cast( signed char value ){ return static_cast(value); } template<> inline bool check_cast( unsigned int value ){ return static_cast(value); } template<> inline short check_cast( bool value ){ return static_cast(value); } template<> inline long double check_cast( bool value ){ return static_cast(value); } template<> inline int check_cast( bool value ){ return static_cast(value); } template<> inline double check_cast( bool value ){ return static_cast(value); } template<> inline unsigned char check_cast( bool value ){ return static_cast(value); } template<> inline unsigned long long check_cast( bool value ){ return static_cast(value); } template<> inline long check_cast( bool value ){ return static_cast(value); } template<> inline char check_cast( bool value ){ return static_cast(value); } template<> inline unsigned short check_cast( bool value ){ return static_cast(value); } template<> inline float check_cast( bool value ){ return static_cast(value); } template<> inline unsigned long check_cast( bool value ){ return static_cast(value); } template<> inline long long check_cast( bool value ){ return static_cast(value); } template<> inline signed char check_cast( bool value ){ return static_cast(value); } template<> inline unsigned int check_cast( bool value ){ return static_cast(value); } template<> inline bool check_cast( bool value ){ return static_cast(value); } } // namespace bsl #endif //__CHECK_CAST_GENERATED_H_