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)
9 * \author Andrey Semashev
12 * The header defines \c copy_cv type trait which copies const/volatile qualifiers from one type to another
15 #ifndef BOOST_LOG_DETAIL_COPY_CV_HPP_INCLUDED_
16 #define BOOST_LOG_DETAIL_COPY_CV_HPP_INCLUDED_
18 #include <boost/log/detail/config.hpp>
19 #include <boost/log/detail/header.hpp>
21 #ifdef BOOST_HAS_PRAGMA_ONCE
27 BOOST_LOG_OPEN_NAMESPACE
31 //! The type trait copies top level const/volatile qualifiers from \c FromT to \c ToT
32 template< typename FromT, typename ToT >
38 template< typename FromT, typename ToT >
39 struct copy_cv< const FromT, ToT >
41 typedef const ToT type;
44 template< typename FromT, typename ToT >
45 struct copy_cv< volatile FromT, ToT >
47 typedef volatile ToT type;
50 template< typename FromT, typename ToT >
51 struct copy_cv< const volatile FromT, ToT >
53 typedef const volatile ToT type;
58 BOOST_LOG_CLOSE_NAMESPACE // namespace log
62 #include <boost/log/detail/footer.hpp>
64 #endif // BOOST_LOG_DETAIL_COPY_CV_HPP_INCLUDED_