blob: 8cd56d8d2490a3e35a6de33528f0ee88c6bca7e5 [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001
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
Jeff Thompson3d613fd2013-10-15 15:39:04 -070011#ifndef NDNBOOST_TT_ADD_CV_HPP_INCLUDED
12#define NDNBOOST_TT_ADD_CV_HPP_INCLUDED
Jeff Thompsona28eed82013-08-22 16:21:10 -070013
14#include <ndnboost/config.hpp>
15
16// should be the last #include
17#include <ndnboost/type_traits/detail/type_trait_def.hpp>
18
19namespace ndnboost {
20
21// * convert a type T to a const volatile type - add_cv<T>
22// this is not required since the result is always
23// the same as "T const volatile", but it does suppress warnings
24// from some compilers:
25
Jeff Thompson3d613fd2013-10-15 15:39:04 -070026#if defined(NDNBOOST_MSVC)
Jeff Thompsona28eed82013-08-22 16:21:10 -070027// This bogus warning will appear when add_volatile is applied to a
28// const volatile reference because we can't detect const volatile
29// references with MSVC6.
30# pragma warning(push)
31# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
32#endif
33
Jeff Thompson3d613fd2013-10-15 15:39:04 -070034NDNBOOST_TT_AUX_TYPE_TRAIT_DEF1(add_cv,T,T const volatile)
Jeff Thompsona28eed82013-08-22 16:21:10 -070035
Jeff Thompson3d613fd2013-10-15 15:39:04 -070036#if defined(NDNBOOST_MSVC)
Jeff Thompsona28eed82013-08-22 16:21:10 -070037# pragma warning(pop)
38#endif
39
Jeff Thompson3d613fd2013-10-15 15:39:04 -070040#ifndef NDNBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
41NDNBOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_cv,T&,T&)
Jeff Thompsona28eed82013-08-22 16:21:10 -070042#endif
43
44} // namespace ndnboost
45
46#include <ndnboost/type_traits/detail/type_trait_undef.hpp>
47
Jeff Thompson3d613fd2013-10-15 15:39:04 -070048#endif // NDNBOOST_TT_ADD_CV_HPP_INCLUDED