require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&__STD_VALARRAY__)) {
    eval 'sub __STD_VALARRAY__ () {1;}' unless defined(&__STD_VALARRAY__);
    eval 'sub _G_NO_VALARRAY_TEMPLATE_EXPORT () {1;}' unless defined(&_G_NO_VALARRAY_TEMPLATE_EXPORT);
    require 'cstddef';
    require 'cmath';
    require 'cstdlib';
    require 'numeric';
    require 'functional';
    require 'algorithm';
    unless(defined(&alloca)) {
	if(defined(&__GNUC__)) {
	    eval 'sub alloca () { &__builtin_alloca;}' unless defined(&alloca);
	} else {
	    if((!defined ( &__STDC__)  && defined ( &sparc)) || defined ( &__sparc__) || defined ( &__sparc) || defined ( &__sgi)) {
		require 'alloca.ph';
	    } else {
		if(defined ( &MSDOS)  && !defined ( &__TURBOC__)) {
		    require 'malloc.ph';
		} else {
		    if(defined( &_AIX)) {
			require 'malloc.ph';
		    } else {
			if(defined(&__hpux)) {
			}
		    }
		}
	    }
	}
    }
    require 'std/valarray_array.ph';
    require 'std/valarray_meta.ph';
    require 'std/slice.ph';
    require 'std/slice_array.ph';
    require 'std/gslice.ph';
    require 'std/gslice_array.ph';
    require 'std/mask_array.ph';
    require 'std/indirect_array.ph';
    eval 'sub _DEFINE_VALARRAY_UNARY_OPERATOR {
        my($_Op, $_Name) = @_;
	    eval q( &template< &typename  &_Tp>  &inline  &_Expr< &_UnClos<$_Name, &_ValArray, &_Tp>,  &_Tp>  &valarray< &_Tp>:: &operator$_Op()  &const {  &typedef  &_UnClos<$_Name, &_ValArray, &_Tp>  &_Closure;  &return  &_Expr< &_Closure,  &_Tp> ( &_Closure (* &this)); });
    }' unless defined(&_DEFINE_VALARRAY_UNARY_OPERATOR);
    undef(&_DEFINE_VALARRAY_UNARY_OPERATOR) if defined(&_DEFINE_VALARRAY_UNARY_OPERATOR);
    eval 'sub _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT {
        my($_Op, $_Name) = @_;
	    eval q( &template< &class  &_Tp>  &inline  &valarray< &_Tp> &  &valarray< &_Tp>:: &operator$_Op= ( &const  &_Tp & &__t) {  &_Array_augmented_$_Name ( &_Array< &_Tp>( &_M_data),  &_M_size,  &__t);  &return * &this; }  &template< &class  &_Tp>  &inline  &valarray< &_Tp> &  &valarray< &_Tp>:: &operator$_Op= ( &const  &valarray< &_Tp> & &__v) {  &_Array_augmented_$_Name ( &_Array< &_Tp>( &_M_data),  &_M_size,  &_Array< &_Tp>( ($__v->{_M_data})));  &return * &this; });
    }' unless defined(&_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT);
    undef(&_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT) if defined(&_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT);
    eval 'sub _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT {
        my($_Op, $_Name) = @_;
	    eval q( &template< &class  &_Tp>  &template< &class  &_Dom>  &inline  &valarray< &_Tp> &  &valarray< &_Tp>:: &operator$_Op= ( &const  &_Expr< &_Dom, &_Tp> & &__e) {  &_Array_augmented_$_Name ( &_Array< &_Tp>( &_M_data),  &__e,  &_M_size);  &return * &this; });
    }' unless defined(&_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT);
    undef(&_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT) if defined(&_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT);
    eval 'sub _DEFINE_BINARY_OPERATOR {
        my($_Op, $_Name) = @_;
	    eval q( &template< &typename  &_Tp>  &inline  &_Expr< &_BinClos<$_Name, &_ValArray, &_ValArray, &_Tp, &_Tp>,  &_Tp>  &operator$_Op ( &const  &valarray< &_Tp> & &__v,  &const  &valarray< &_Tp> & &__w) {  &typedef  &_BinClos<$_Name, &_ValArray, &_ValArray, &_Tp, &_Tp>  &_Closure;  &return  &_Expr< &_Closure,  &_Tp> ( &_Closure ( &__v,  &__w)); }  &template< &typename  &_Tp>  &inline  &_Expr< &_BinClos<$_Name, &_ValArray, &_Constant, &_Tp, &_Tp>, &_Tp>  &operator$_Op ( &const  &valarray< &_Tp> & &__v,  &const  &_Tp & &__t) {  &typedef  &_BinClos<$_Name, &_ValArray, &_Constant, &_Tp, &_Tp>  &_Closure;  &return  &_Expr< &_Closure,  &_Tp> ( &_Closure ( &__v,  &__t)); }  &template< &typename  &_Tp>  &inline  &_Expr< &_BinClos<$_Name, &_Constant, &_ValArray, &_Tp, &_Tp>, &_Tp>  &operator$_Op ( &const  &_Tp & &__t,  &const  &valarray< &_Tp> & &__v) {  &typedef  &_BinClos<$_Name, &_Constant, &_ValArray, &_Tp, &_Tp>  &_Closure;  &return  &_Expr< &_Closure,  &_Tp> ( &_Closure ( &__t,  &__v)); });
    }' unless defined(&_DEFINE_BINARY_OPERATOR);
    undef(&_DEFINE_BINARY_OPERATOR) if defined(&_DEFINE_BINARY_OPERATOR);
    eval 'sub _DEFINE_LOGICAL_OPERATOR {
        my($_Op, $_Name) = @_;
	    eval q( &template< &typename  &_Tp>  &inline  &_Expr< &_BinClos<$_Name, &_ValArray, &_ValArray, &_Tp, &_Tp>, &bool>  &operator$_Op ( &const  &valarray< &_Tp> & &__v,  &const  &valarray< &_Tp> & &__w) {  &typedef  &_BinClos<$_Name, &_ValArray, &_ValArray, &_Tp, &_Tp>  &_Closure;  &return  &_Expr< &_Closure,  &bool> ( &_Closure ( &__v,  &__w)); }  &template< &class  &_Tp>  &inline  &_Expr< &_BinClos<$_Name, &_ValArray, &_Constant, &_Tp, &_Tp>, &bool>  &operator$_Op ( &const  &valarray< &_Tp> & &__v,  &const  &_Tp & &__t) {  &typedef  &_BinClos<$_Name, &_ValArray, &_Constant, &_Tp, &_Tp>  &_Closure;  &return  &_Expr< &_Closure,  &bool> ( &_Closure ( &__v,  &__t)); }  &template< &class  &_Tp>  &inline  &_Expr< &_BinClos<$_Name, &_Constant, &_ValArray, &_Tp, &_Tp>, &bool>  &operator$_Op ( &const  &_Tp & &__t,  &const  &valarray< &_Tp> & &__v) {  &typedef  &_BinClos<$_Name, &_Constant, &_ValArray, &_Tp, &_Tp>  &_Closure;  &return  &_Expr< &_Closure,  &bool> ( &_Closure ( &__t,  &__v)); });
    }' unless defined(&_DEFINE_LOGICAL_OPERATOR);
    undef(&_DEFINE_VALARRAY_OPERATOR) if defined(&_DEFINE_VALARRAY_OPERATOR);
    undef(&_G_NO_VALARRAY_TEMPLATE_EXPORT) if defined(&_G_NO_VALARRAY_TEMPLATE_EXPORT);
}
1;
