00001 /* 00002 This file is part of GraphLab. 00003 00004 GraphLab is free software: you can redistribute it and/or modify 00005 it under the terms of the GNU Lesser General Public License as 00006 published by the Free Software Foundation, either version 3 of 00007 the License, or (at your option) any later version. 00008 00009 GraphLab is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU Lesser General Public License for more details. 00013 00014 You should have received a copy of the GNU Lesser General Public 00015 License along with GraphLab. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #ifndef GRAPHLAB_IS_POD_HPP 00019 #define GRAPHLAB_IS_POD_HPP 00020 #include <boost/type_traits.hpp> 00021 00022 namespace graphlab { 00023 00024 template <typename T> 00025 struct gl_is_pod{ 00026 // it is a pod and is not an integer since we have special handlings for integers 00027 00028 // (T is POD and T is not an integer of size >= 2) 00029 BOOST_STATIC_CONSTANT(bool, value = 00030 ( 00031 boost::type_traits::ice_and< 00032 boost::is_pod<T>::value, 00033 boost::type_traits::ice_not< 00034 boost::type_traits::ice_and< 00035 boost::is_integral<T>::value, 00036 sizeof(T) >= 2 00037 >::value 00038 >::value 00039 >::value 00040 )); 00041 00042 }; 00043 00044 } 00045 00046 #endif 00047 00048 00049
1.7.1