Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:39:20

0001 /*
0002  *          Copyright Andrey Semashev 2007 - 2015.
0003  * Distributed under the Boost Software License, Version 1.0.
0004  *    (See accompanying file LICENSE_1_0.txt or copy at
0005  *          http://www.boost.org/LICENSE_1_0.txt)
0006  */
0007 /*!
0008  * \file   copy_cv.hpp
0009  * \author Andrey Semashev
0010  * \date   16.03.2014
0011  *
0012  * The header defines \c copy_cv type trait which copies const/volatile qualifiers from one type to another
0013  */
0014 
0015 #ifndef BOOST_LOG_DETAIL_COPY_CV_HPP_INCLUDED_
0016 #define BOOST_LOG_DETAIL_COPY_CV_HPP_INCLUDED_
0017 
0018 #include <boost/log/detail/config.hpp>
0019 #include <boost/log/detail/header.hpp>
0020 
0021 #ifdef BOOST_HAS_PRAGMA_ONCE
0022 #pragma once
0023 #endif
0024 
0025 namespace boost {
0026 
0027 BOOST_LOG_OPEN_NAMESPACE
0028 
0029 namespace aux {
0030 
0031 //! The type trait copies top level const/volatile qualifiers from \c FromT to \c ToT
0032 template< typename FromT, typename ToT >
0033 struct copy_cv
0034 {
0035     typedef ToT type;
0036 };
0037 
0038 template< typename FromT, typename ToT >
0039 struct copy_cv< const FromT, ToT >
0040 {
0041     typedef const ToT type;
0042 };
0043 
0044 template< typename FromT, typename ToT >
0045 struct copy_cv< volatile FromT, ToT >
0046 {
0047     typedef volatile ToT type;
0048 };
0049 
0050 template< typename FromT, typename ToT >
0051 struct copy_cv< const volatile FromT, ToT >
0052 {
0053     typedef const volatile ToT type;
0054 };
0055 
0056 } // namespace aux
0057 
0058 BOOST_LOG_CLOSE_NAMESPACE // namespace log
0059 
0060 } // namespace boost
0061 
0062 #include <boost/log/detail/footer.hpp>
0063 
0064 #endif // BOOST_LOG_DETAIL_COPY_CV_HPP_INCLUDED_