[857] | 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 |
|
---|
| 9 | namespace boost { namespace python { namespace detail {
|
---|
| 10 |
|
---|
| 11 | template <bool is_const_, bool is_volatile_>
|
---|
| 12 | struct cv_tag
|
---|
| 13 | {
|
---|
| 14 | BOOST_STATIC_CONSTANT(bool, is_const = is_const_);
|
---|
| 15 | BOOST_STATIC_CONSTANT(bool, is_volatile = is_const_);
|
---|
| 16 | };
|
---|
| 17 |
|
---|
| 18 | typedef cv_tag<false,false> cv_unqualified;
|
---|
| 19 | typedef cv_tag<true,false> const_;
|
---|
| 20 | typedef cv_tag<false,true> volatile_;
|
---|
| 21 | typedef cv_tag<true,true> const_volatile_;
|
---|
| 22 |
|
---|
| 23 | template <class T>
|
---|
| 24 | struct 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
|
---|