Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/move/detail/launder.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 //////////////////////////////////////////////////////////////////////////////
0002 //
0003 // (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost
0004 // Software License, Version 1.0. (See accompanying file
0005 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // See http://www.boost.org/libs/container for documentation.
0008 //
0009 //////////////////////////////////////////////////////////////////////////////
0010 #ifndef BOOST_MOVE_DETAIL_LAUNDER_HPP
0011 #define BOOST_MOVE_DETAIL_LAUNDER_HPP
0012 
0013 #ifndef BOOST_CONFIG_HPP
0014 #  include <boost/config.hpp>
0015 #endif
0016 
0017 #if defined(BOOST_HAS_PRAGMA_ONCE)
0018 #  pragma once
0019 #endif
0020 
0021 #include <boost/move/detail/workaround.hpp>
0022 
0023 namespace boost {
0024 namespace move_detail {
0025 
0026 #if defined(BOOST_MOVE_HAS_BUILTIN_LAUNDER)
0027 
0028 template<class T>
0029 BOOST_MOVE_FORCEINLINE T* launder(T* p)
0030 {
0031     return __builtin_launder( p );
0032 }
0033 
0034 #else
0035 
0036 template<class T>
0037 BOOST_MOVE_FORCEINLINE T* launder(T* p)
0038 {
0039     return p;
0040 }
0041 
0042 #endif
0043 
0044 template<class T>
0045 BOOST_MOVE_FORCEINLINE T launder_cast(const volatile void* p)
0046 {
0047    return (launder)((T)p);
0048 }
0049 
0050 }  //namespace move_detail {
0051 }  //namespace boost {
0052 
0053 #endif   //#ifndef BOOST_MOVE_DETAIL_LAUNDER_HPP