| 1 |  | 
| 2 | //  (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,  | 
| 3 | //      Howard Hinnant and John Maddock 2000.  | 
| 4 | //  (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 | 
| 5 |  | 
| 6 | //  Use, modification and distribution are subject to the Boost Software License, | 
| 7 | //  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | 
| 8 | //  http://www.boost.org/LICENSE_1_0.txt). | 
| 9 | // | 
| 10 | //  See http://www.boost.org/libs/type_traits for most recent version including documentation. | 
| 11 |  | 
| 12 | //    Fixed is_pointer, is_reference, is_const, is_volatile, is_same,  | 
| 13 | //    is_member_pointer based on the Simulated Partial Specialization work  | 
| 14 | //    of Mat Marcus and Jesse Jones. See  http://opensource.adobe.com or  | 
| 15 | //    http://groups.yahoo.com/group/boost/message/5441  | 
| 16 | //    Some workarounds in here use ideas suggested from "Generic<Programming>:  | 
| 17 | //    Mappings between Types and Values"  | 
| 18 | //    by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). | 
| 19 |  | 
| 20 |  | 
| 21 | #ifndef BOOST_TT_IS_VOLATILE_HPP_INCLUDED | 
| 22 | #define BOOST_TT_IS_VOLATILE_HPP_INCLUDED | 
| 23 |  | 
| 24 | #include <cstddef> // size_t | 
| 25 | #include <boost/type_traits/integral_constant.hpp> | 
| 26 |  | 
| 27 | namespace boost { | 
| 28 |  | 
| 29 | #if defined( __CODEGEARC__ ) | 
| 30 |  | 
| 31 |    template <class T> | 
| 32 |    struct is_volatile : public integral_constant<bool, __is_volatile(T)> {}; | 
| 33 |  | 
| 34 | #else | 
| 35 |  | 
| 36 |    template <class T> | 
| 37 |    struct is_volatile : public false_type {}; | 
| 38 |    template <class T> struct is_volatile<T volatile> : public true_type{}; | 
| 39 |    template <class T, std::size_t N> struct is_volatile<T volatile[N]> : public true_type{}; | 
| 40 |    template <class T> struct is_volatile<T volatile[]> : public true_type{}; | 
| 41 |  | 
| 42 | #endif | 
| 43 |  | 
| 44 | } // namespace boost | 
| 45 |  | 
| 46 | #endif // BOOST_TT_IS_VOLATILE_HPP_INCLUDED | 
| 47 |  |