]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/log/include/boost/log/detail/copy_cv.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / log / include / boost / log / detail / copy_cv.hpp
CommitLineData
7c673cae
FG
1/*
2 * Copyright Andrey Semashev 2007 - 2015.
3 * Distributed under the Boost Software License, Version 1.0.
4 * (See accompanying file LICENSE_1_0.txt or copy at
5 * http://www.boost.org/LICENSE_1_0.txt)
6 */
7/*!
8 * \file copy_cv.hpp
9 * \author Andrey Semashev
10 * \date 16.03.2014
11 *
12 * The header defines \c copy_cv type trait which copies const/volatile qualifiers from one type to another
13 */
14
15#ifndef BOOST_LOG_DETAIL_COPY_CV_HPP_INCLUDED_
16#define BOOST_LOG_DETAIL_COPY_CV_HPP_INCLUDED_
17
18#include <boost/log/detail/config.hpp>
19#include <boost/log/detail/header.hpp>
20
21#ifdef BOOST_HAS_PRAGMA_ONCE
22#pragma once
23#endif
24
25namespace boost {
26
27BOOST_LOG_OPEN_NAMESPACE
28
29namespace aux {
30
31//! The type trait copies top level const/volatile qualifiers from \c FromT to \c ToT
32template< typename FromT, typename ToT >
33struct copy_cv
34{
35 typedef ToT type;
36};
37
38template< typename FromT, typename ToT >
39struct copy_cv< const FromT, ToT >
40{
41 typedef const ToT type;
42};
43
44template< typename FromT, typename ToT >
45struct copy_cv< volatile FromT, ToT >
46{
47 typedef volatile ToT type;
48};
49
50template< typename FromT, typename ToT >
51struct copy_cv< const volatile FromT, ToT >
52{
53 typedef const volatile ToT type;
54};
55
56} // namespace aux
57
58BOOST_LOG_CLOSE_NAMESPACE // namespace log
59
60} // namespace boost
61
62#include <boost/log/detail/footer.hpp>
63
64#endif // BOOST_LOG_DETAIL_COPY_CV_HPP_INCLUDED_