Show
Ignore:
Timestamp:
06/10/08 16:39:31 (7 months ago)
Author:
rjrw
Message:

Remove another unnecessary template parameter.

Include (and use) STATIC_ASSERT for checking compile-time consistency.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/container_classes.h

    r2105 r2106  
    275275//! multi_geom - this class maintains all the geometry information for multi_arr 
    276276//! keeping it separate makes it easy to clone the information from one multi_arr to another 
    277 template<int d,mem_layout ALLOC=MEM_LAYOUT_VAL,bool lgBC=lgBOUNDSCHECKVAL> 
     277template<int d,mem_layout ALLOC=MEM_LAYOUT_VAL> 
    278278class multi_geom 
    279279{ 
     
    382382#       pragma warning( disable : 4127 ) 
    383383#endif 
     384 
     385                STATIC_ASSERT ( ALLOC == C_TYPE || ALLOC == ARPA_TYPE ); 
     386 
    384387                if( ALLOC == ARPA_TYPE ) 
    385388                { 
     
    403406                { 
    404407                        TotalInsanity(); 
    405                 }                
     408                } 
    406409        } 
    407410 
     
    902905{ 
    903906        // ancillary data describing the memory layout of the multi_arr 
    904         multi_geom<d,ALLOC,lgBC> p_g; 
     907        multi_geom<d,ALLOC> p_g; 
    905908        T** p_psl[d-1];     // pointer arrays for ARPA structure 
    906909        valarray<T> p_dsl;  // this contains the actual data 
     
    951954                p_clear1(); 
    952955        } 
    953         multi_arr(const multi_geom<d,ALLOC,lgBC>& g) 
     956        multi_arr(const multi_geom<d,ALLOC>& g) 
    954957        { 
    955958                p_clear1(); 
     
    10261029#       pragma warning( disable : 4127 ) 
    10271030#endif 
     1031                STATIC_ASSERT ( ALLOC == C_TYPE || ALLOC == ARPA_TYPE ); 
     1032 
    10281033                if( ALLOC == ARPA_TYPE ) 
    10291034                { 
     
    10641069        } 
    10651070        // clone the geometry from another multi_arr 
    1066         void alloc(const multi_geom<d,ALLOC,lgBC>& g) 
     1071        void alloc(const multi_geom<d,ALLOC>& g) 
    10671072        { 
    10681073                if( &g != &p_g ) 
     
    16471652        } 
    16481653 
    1649         const multi_geom<d,ALLOC,lgBC>& clone() const 
     1654        const multi_geom<d,ALLOC>& clone() const 
    16501655        { 
    16511656                return p_g;