require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_EXT_NUMERIC_TRAITS)) {
    eval 'sub _EXT_NUMERIC_TRAITS () {1;}' unless defined(&_EXT_NUMERIC_TRAITS);
    require 'bits/cpp_type_traits.ph';
    require 'ext/type_traits.ph';
    eval("sub __width () { __value?sizeof(_Tp)*__CHAR_BIT__:0; }") unless defined(&__width);
    if((defined(&__cplusplus) ? &__cplusplus : undef) >= 201103) {
    }
    eval 'sub _GLIBCXX_INT_N_TRAITS {
        my($T, $WIDTH) = @_;
	    eval q( &template<> \'struct __is_integer_nonstrict\'<$T> {  &enum {  &__value = 1};  &typedef  &std:: &__true_type  &__type;  &enum {  &__width = $WIDTH }; };  &template<> \'struct __is_integer_nonstrict\'<\'unsigned T\'> {  &enum {  &__value = 1};  &typedef  &std:: &__true_type  &__type;  &enum {  &__width = $WIDTH }; };);
    }' unless defined(&_GLIBCXX_INT_N_TRAITS);
    if(defined (&__GLIBCXX_TYPE_INT_N_0)  && (defined(&__GLIBCXX_BITSIZE_INT_N_0) ? &__GLIBCXX_BITSIZE_INT_N_0 : undef) % (defined(&__CHAR_BIT__) ? &__CHAR_BIT__ : undef)) {
    }
    if(defined (&__GLIBCXX_TYPE_INT_N_1)  && (defined(&__GLIBCXX_BITSIZE_INT_N_1) ? &__GLIBCXX_BITSIZE_INT_N_1 : undef) % (defined(&__CHAR_BIT__) ? &__CHAR_BIT__ : undef)) {
    }
    if(defined (&__GLIBCXX_TYPE_INT_N_2)  && (defined(&__GLIBCXX_BITSIZE_INT_N_2) ? &__GLIBCXX_BITSIZE_INT_N_2 : undef) % (defined(&__CHAR_BIT__) ? &__CHAR_BIT__ : undef)) {
    }
    if(defined (&__GLIBCXX_TYPE_INT_N_3)  && (defined(&__GLIBCXX_BITSIZE_INT_N_3) ? &__GLIBCXX_BITSIZE_INT_N_3 : undef) % (defined(&__CHAR_BIT__) ? &__CHAR_BIT__ : undef)) {
    }
    if(defined (&__STRICT_ANSI__)  && defined (&__SIZEOF_INT128__)) {
    }
    undef(&_GLIBCXX_INT_N_TRAITS) if defined(&_GLIBCXX_INT_N_TRAITS);
    if((defined(&__cplusplus) ? &__cplusplus : undef) >= 201103) {
    }
    eval 'sub __glibcxx_floating {
        my($_Tp, $_Fval, $_Dval, $_LDval) = @_;
	    eval q(( &std:: &__are_same<$_Tp, \'float\'>:: &__value ? $_Fval :  &std:: &__are_same<$_Tp, \'double\'>:: &__value ? $_Dval : $_LDval));
    }' unless defined(&__glibcxx_floating);
    eval 'sub __glibcxx_max_digits10 {
        my($_Tp) = @_;
	    eval q((2+  &__glibcxx_floating($_Tp,  &__FLT_MANT_DIG__,  &__DBL_MANT_DIG__,  &__LDBL_MANT_DIG__) * 643 / 2136));
    }' unless defined(&__glibcxx_max_digits10);
    eval 'sub __glibcxx_digits10 {
        my($_Tp) = @_;
	    eval q( &__glibcxx_floating($_Tp,  &__FLT_DIG__,  &__DBL_DIG__,  &__LDBL_DIG__));
    }' unless defined(&__glibcxx_digits10);
    eval 'sub __glibcxx_max_exponent10 {
        my($_Tp) = @_;
	    eval q( &__glibcxx_floating($_Tp,  &__FLT_MAX_10_EXP__,  &__DBL_MAX_10_EXP__,  &__LDBL_MAX_10_EXP__));
    }' unless defined(&__glibcxx_max_exponent10);
    undef(&__glibcxx_floating) if defined(&__glibcxx_floating);
    undef(&__glibcxx_max_digits10) if defined(&__glibcxx_max_digits10);
    undef(&__glibcxx_digits10) if defined(&__glibcxx_digits10);
    undef(&__glibcxx_max_exponent10) if defined(&__glibcxx_max_exponent10);
}
1;
