BWAPI
|
00001 // Copyright (c) 2006-2008 Max-Planck-Institute Saarbruecken (Germany) 00002 // All rights reserved. 00003 // 00004 // This file is part of CGAL (www.cgal.org); you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public License as 00006 // published by the Free Software Foundation; version 2.1 of the License. 00007 // See the file LICENSE.LGPL distributed with CGAL. 00008 // 00009 // Licensees holding a valid commercial license may use this file in 00010 // accordance with the commercial license agreement provided with the software. 00011 // 00012 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00013 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00014 // 00015 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Number_types/include/CGAL/utils.h $ 00016 // $Id: utils.h 47264 2008-12-08 06:25:14Z hemmer $ 00017 // 00018 // 00019 // Author(s) : Michael Hemmer <hemmer@mpi-sb.mpg.de> 00020 00021 #ifndef CGAL_UTILS_H 00022 #define CGAL_UTILS_H 00023 00024 #include <CGAL/number_type_basic.h> 00025 00026 CGAL_BEGIN_NAMESPACE 00027 00028 // use Min 00029 template< class T > 00030 inline T min BOOST_PREVENT_MACRO_SUBSTITUTION 00031 ( const T& x , const T& y) { 00032 return Min<T>()( x , y ); 00033 }; 00034 00035 template< class T , class Compare > 00036 inline T min BOOST_PREVENT_MACRO_SUBSTITUTION 00037 ( const T& x , const T& y, const Compare& c) { 00038 return Min<T, Compare>(c)( x , y ); 00039 }; 00040 00041 // use Max 00042 template< class T > 00043 inline T max BOOST_PREVENT_MACRO_SUBSTITUTION 00044 ( const T& x , const T& y) { 00045 return Max<T>()( x , y ); 00046 }; 00047 00048 template< class T , class Compare > 00049 inline T max BOOST_PREVENT_MACRO_SUBSTITUTION 00050 ( const T& x , const T& y, const Compare& c) { 00051 return Max<T, Compare>(c)( x , y ); 00052 }; 00053 00054 // use Is_valid 00055 template< class T > 00056 inline bool is_valid( const T& x ) { 00057 return Is_valid< T >()( x ); 00058 }; 00059 00060 CGAL_END_NAMESPACE 00061 00062 #endif // CGAL_UTILS_H