File indexing completed on 2025-01-18 09:53:44
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_WINAPI_DETAIL_CAST_PTR_HPP_INCLUDED_
0009 #define BOOST_WINAPI_DETAIL_CAST_PTR_HPP_INCLUDED_
0010
0011 #include <boost/winapi/config.hpp>
0012 #include <boost/winapi/detail/header.hpp>
0013
0014 #ifdef BOOST_HAS_PRAGMA_ONCE
0015 #pragma once
0016 #endif
0017
0018 namespace boost {
0019 namespace winapi {
0020 namespace detail {
0021
0022
0023 class cast_ptr
0024 {
0025 private:
0026 const void* m_p;
0027
0028 public:
0029 explicit BOOST_FORCEINLINE cast_ptr(const void* p) BOOST_NOEXCEPT : m_p(p) {}
0030 template< typename T >
0031 BOOST_FORCEINLINE operator T* () const BOOST_NOEXCEPT { return (T*)m_p; }
0032 };
0033
0034 }
0035 }
0036 }
0037
0038 #include <boost/winapi/detail/footer.hpp>
0039
0040 #endif