source: NonGTP/Boost/boost/python/detail/cv_category.hpp @ 857

Revision 857, 1.1 KB checked in by igarcia, 18 years ago (diff)
Line 
1// Copyright David Abrahams 2002.
2// Distributed under the Boost Software License, Version 1.0. (See
3// accompanying file LICENSE_1_0.txt or copy at
4// http://www.boost.org/LICENSE_1_0.txt)
5#ifndef CV_CATEGORY_DWA200222_HPP
6# define CV_CATEGORY_DWA200222_HPP
7# include <boost/type_traits/cv_traits.hpp>
8
9namespace boost { namespace python { namespace detail {
10
11template <bool is_const_, bool is_volatile_>
12struct cv_tag
13{
14    BOOST_STATIC_CONSTANT(bool, is_const = is_const_);
15    BOOST_STATIC_CONSTANT(bool, is_volatile = is_const_);
16};
17
18typedef cv_tag<false,false> cv_unqualified;
19typedef cv_tag<true,false> const_;
20typedef cv_tag<false,true> volatile_;
21typedef cv_tag<true,true> const_volatile_;
22
23template <class T>
24struct cv_category
25{
26//    BOOST_STATIC_CONSTANT(bool, c = is_const<T>::value);
27//    BOOST_STATIC_CONSTANT(bool, v = is_volatile<T>::value);
28    typedef cv_tag<
29        ::boost::is_const<T>::value
30      , ::boost::is_volatile<T>::value
31    > type;
32};
33
34}}} // namespace boost::python::detail
35
36#endif // CV_CATEGORY_DWA200222_HPP
Note: See TracBrowser for help on using the repository browser.