Chris@102: /* Chris@102: * Copyright Andrey Semashev 2007 - 2015. Chris@102: * Distributed under the Boost Software License, Version 1.0. Chris@102: * (See accompanying file LICENSE_1_0.txt or copy at Chris@102: * http://www.boost.org/LICENSE_1_0.txt) Chris@102: */ Chris@102: /*! Chris@102: * \file copy_cv.hpp Chris@102: * \author Andrey Semashev Chris@102: * \date 16.03.2014 Chris@102: * Chris@102: * The header defines \c copy_cv type trait which copies const/volatile qualifiers from one type to another Chris@102: */ Chris@102: Chris@102: #ifndef BOOST_LOG_DETAIL_COPY_CV_HPP_INCLUDED_ Chris@102: #define BOOST_LOG_DETAIL_COPY_CV_HPP_INCLUDED_ Chris@102: Chris@102: #include Chris@102: #include Chris@102: Chris@102: #ifdef BOOST_HAS_PRAGMA_ONCE Chris@102: #pragma once Chris@102: #endif Chris@102: Chris@102: namespace boost { Chris@102: Chris@102: BOOST_LOG_OPEN_NAMESPACE Chris@102: Chris@102: namespace aux { Chris@102: Chris@102: //! The type trait copies top level const/volatile qualifiers from \c FromT to \c ToT Chris@102: template< typename FromT, typename ToT > Chris@102: struct copy_cv Chris@102: { Chris@102: typedef ToT type; Chris@102: }; Chris@102: Chris@102: template< typename FromT, typename ToT > Chris@102: struct copy_cv< const FromT, ToT > Chris@102: { Chris@102: typedef const ToT type; Chris@102: }; Chris@102: Chris@102: template< typename FromT, typename ToT > Chris@102: struct copy_cv< volatile FromT, ToT > Chris@102: { Chris@102: typedef volatile ToT type; Chris@102: }; Chris@102: Chris@102: template< typename FromT, typename ToT > Chris@102: struct copy_cv< const volatile FromT, ToT > Chris@102: { Chris@102: typedef const volatile ToT type; Chris@102: }; Chris@102: Chris@102: } // namespace aux Chris@102: Chris@102: BOOST_LOG_CLOSE_NAMESPACE // namespace log Chris@102: Chris@102: } // namespace boost Chris@102: Chris@102: #include Chris@102: Chris@102: #endif // BOOST_LOG_DETAIL_COPY_CV_HPP_INCLUDED_