blob: 47c5ed07038476cd5b701b59ec50175f46c6af95 [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
Jeff Thompson3d613fd2013-10-15 15:39:04 -070010#ifndef NDNBOOST_TT_ADD_CONST_HPP_INCLUDED
11#define NDNBOOST_TT_ADD_CONST_HPP_INCLUDED
Jeff Thompsona28eed82013-08-22 16:21:10 -070012
13#include <ndnboost/config.hpp>
14
15// should be the last #include
16#include <ndnboost/type_traits/detail/type_trait_def.hpp>
17
18namespace ndnboost {
19
20// * convert a type T to const type - add_const<T>
21// this is not required since the result is always
22// the same as "T const", but it does suppress warnings
23// from some compilers:
24
Jeff Thompson3d613fd2013-10-15 15:39:04 -070025#if defined(NDNBOOST_MSVC)
Jeff Thompsona28eed82013-08-22 16:21:10 -070026// This bogus warning will appear when add_const is applied to a
27// const volatile reference because we can't detect const volatile
28// references with MSVC6.
29# pragma warning(push)
30# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
31#endif
32
Jeff Thompson3d613fd2013-10-15 15:39:04 -070033NDNBOOST_TT_AUX_TYPE_TRAIT_DEF1(add_const,T,T const)
Jeff Thompsona28eed82013-08-22 16:21:10 -070034
Jeff Thompson3d613fd2013-10-15 15:39:04 -070035#if defined(NDNBOOST_MSVC)
Jeff Thompsona28eed82013-08-22 16:21:10 -070036# pragma warning(pop)
37#endif
38
Jeff Thompson3d613fd2013-10-15 15:39:04 -070039#ifndef NDNBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
40NDNBOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_const,T&,T&)
Jeff Thompsona28eed82013-08-22 16:21:10 -070041#endif
42
43} // namespace ndnboost
44
45#include <ndnboost/type_traits/detail/type_trait_undef.hpp>
46
Jeff Thompson3d613fd2013-10-15 15:39:04 -070047#endif // NDNBOOST_TT_ADD_CONST_HPP_INCLUDED