New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
remove_volatile.hpp in vendors/XIOS/current/extern/boost/include/boost/type_traits – NEMO

source: vendors/XIOS/current/extern/boost/include/boost/type_traits/remove_volatile.hpp @ 3408

Last change on this file since 3408 was 3408, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1
2//  (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
3//  Hinnant & John Maddock 2000. 
4//  Use, modification and distribution are subject to the Boost Software License,
5//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6//  http://www.boost.org/LICENSE_1_0.txt).
7//
8//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
9
10
11#ifndef BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED
12#define BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED
13
14#include <boost/type_traits/is_const.hpp>
15#include <boost/type_traits/broken_compiler_spec.hpp>
16#include <boost/type_traits/detail/cv_traits_impl.hpp>
17#include <boost/config.hpp>
18#include <boost/detail/workaround.hpp>
19
20#include <cstddef>
21
22#if BOOST_WORKAROUND(BOOST_MSVC,<=1300)
23#include <boost/type_traits/msvc/remove_volatile.hpp>
24#endif
25
26// should be the last #include
27#include <boost/type_traits/detail/type_trait_def.hpp>
28
29namespace boost {
30
31#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
32
33namespace detail {
34
35template <typename T, bool is_const>
36struct remove_volatile_helper
37{
38    typedef T type;
39};
40
41template <typename T>
42struct remove_volatile_helper<T,true>
43{
44    typedef T const type;
45};
46
47template <typename T>
48struct remove_volatile_impl
49{
50    typedef typename remove_volatile_helper<
51          typename cv_traits_imp<T*>::unqualified_type
52        , ::boost::is_const<T>::value
53        >::type type;
54};
55
56//
57// We can't filter out rvalue_references at the same level as
58// references or we get ambiguities from msvc:
59//
60#ifndef BOOST_NO_RVALUE_REFERENCES
61template <typename T>
62struct remove_volatile_impl<T&&>
63{
64    typedef T&& type;
65};
66#endif
67} // namespace detail
68
69// * convert a type T to a non-volatile type - remove_volatile<T>
70
71BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename boost::detail::remove_volatile_impl<T>::type)
72BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_volatile,T&,T&)
73#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
74BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T volatile[N],T type[N])
75BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T const volatile[N],T const type[N])
76#endif
77
78#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300)
79
80BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename boost::detail::remove_volatile_impl<T>::type)
81
82#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
83
84} // namespace boost
85
86#include <boost/type_traits/detail/type_trait_undef.hpp>
87
88#endif // BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED
Note: See TracBrowser for help on using the repository browser.