00001 #ifndef BOOST_ATOMIC_DETAIL_ATOMIC_VALID_INTEGRAL_TYPES_HPP 00002 #define BOOST_ATOMIC_DETAIL_ATOMIC_VALID_INTEGRAL_TYPES_HPP 00003 00004 // Copyright (c) 2009 Helge Bahmann 00005 // 00006 // Distributed under the Boost Software License, Version 1.0. 00007 // See accompanying file LICENSE_1_0.txt or copy at 00008 // http://www.boost.org/LICENSE_1_0.txt) 00009 00010 #include <boost/cstdint.hpp> 00011 00012 namespace boost_atomic { 00013 using namespace boost; 00014 namespace detail { 00015 namespace atomic { 00016 00017 template<typename T> struct is_integral_type {typedef void test;}; 00018 00019 template<> struct is_integral_type<char> {typedef int test;}; 00020 00021 template<> struct is_integral_type<unsigned char> {typedef int test;}; 00022 template<> struct is_integral_type<signed char> {typedef int test;}; 00023 template<> struct is_integral_type<unsigned short> {typedef int test;}; 00024 template<> struct is_integral_type<signed short> {typedef int test;}; 00025 template<> struct is_integral_type<unsigned int> {typedef int test;}; 00026 template<> struct is_integral_type<signed int> {typedef int test;}; 00027 template<> struct is_integral_type<unsigned long> {typedef int test;}; 00028 template<> struct is_integral_type<long> {typedef int test;}; 00029 #ifdef BOOST_HAS_LONG_LONG 00030 template<> struct is_integral_type<unsigned long long> {typedef int test;}; 00031 template<> struct is_integral_type<signed long long> {typedef int test;}; 00032 #endif 00033 00034 } 00035 } 00036 } 00037 00038 #endif