Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:12

0001 
0002 //  (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, 
0003 //      Howard Hinnant and John Maddock 2000. 
0004 //  (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001
0005 
0006 //  Use, modification and distribution are subject to the Boost Software License,
0007 //  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0008 //  http://www.boost.org/LICENSE_1_0.txt).
0009 //
0010 //  See http://www.boost.org/libs/type_traits for most recent version including documentation.
0011 
0012 //    Fixed is_pointer, is_reference, is_const, is_volatile, is_same, 
0013 //    is_member_pointer based on the Simulated Partial Specialization work 
0014 //    of Mat Marcus and Jesse Jones. See  http://opensource.adobe.com or 
0015 //    http://groups.yahoo.com/group/boost/message/5441 
0016 //    Some workarounds in here use ideas suggested from "Generic<Programming>: 
0017 //    Mappings between Types and Values" 
0018 //    by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html).
0019 
0020 
0021 #ifndef BOOST_TT_IS_VOLATILE_HPP_INCLUDED
0022 #define BOOST_TT_IS_VOLATILE_HPP_INCLUDED
0023 
0024 #include <cstddef> // size_t
0025 #include <boost/type_traits/integral_constant.hpp>
0026 
0027 namespace boost {
0028 
0029 #if defined( BOOST_CODEGEARC )
0030 
0031    template <class T>
0032    struct is_volatile : public integral_constant<bool, __is_volatile(T)> {};
0033 
0034 #else
0035 
0036    template <class T>
0037    struct is_volatile : public false_type {};
0038    template <class T> struct is_volatile<T volatile> : public true_type{};
0039    template <class T, std::size_t N> struct is_volatile<T volatile[N]> : public true_type{};
0040    template <class T> struct is_volatile<T volatile[]> : public true_type{};
0041 
0042 #endif
0043 
0044 } // namespace boost
0045 
0046 #endif // BOOST_TT_IS_VOLATILE_HPP_INCLUDED