Documentation


utils.h

Go to the documentation of this file.
00001 #ifndef animal_utils_hpp______________________________________
00002 #define animal_utils_hpp______________________________________
00003 
00004 namespace animal
00005 {
00006 
00008 template <class T> inline
00009 T sqr( const T& t )
00010 {
00011     return t*t;
00012 }
00013 
00015 template <class T> inline
00016 void erase( T*& ptr )
00017 {
00018     assert( ptr != 0 );
00019     delete ptr;
00020     ptr = 0;
00021 }
00022 
00023 }//animal
00024 #endif

Generated on Thu Dec 23 13:52:27 2004 by doxygen 1.3.6