Server IP : 172.67.216.182 / Your IP : 162.158.170.194 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/boost/boost_1_59_0/boost/core/ |
Upload File : |
// Copyright (C) 2002 Brad King ([email protected]) // Douglas Gregor ([email protected]) // // Copyright (C) 2002, 2008, 2013 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org #ifndef BOOST_CORE_ADDRESSOF_HPP #define BOOST_CORE_ADDRESSOF_HPP # include <boost/config.hpp> # include <boost/detail/workaround.hpp> # include <cstddef> namespace boost { namespace detail { template<class T> struct addr_impl_ref { T & v_; BOOST_FORCEINLINE addr_impl_ref( T & v ): v_( v ) {} BOOST_FORCEINLINE operator T& () const { return v_; } private: addr_impl_ref & operator=(const addr_impl_ref &); }; template<class T> struct addressof_impl { static BOOST_FORCEINLINE T * f( T & v, long ) { return reinterpret_cast<T*>( &const_cast<char&>(reinterpret_cast<const volatile char &>(v))); } static BOOST_FORCEINLINE T * f( T * v, int ) { return v; } }; #if !defined( BOOST_NO_CXX11_NULLPTR ) #if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) ) typedef decltype(nullptr) addr_nullptr_t; #else typedef std::nullptr_t addr_nullptr_t; #endif template<> struct addressof_impl< addr_nullptr_t > { typedef addr_nullptr_t T; static BOOST_FORCEINLINE T * f( T & v, int ) { return &v; } }; template<> struct addressof_impl< addr_nullptr_t const > { typedef addr_nullptr_t const T; static BOOST_FORCEINLINE T * f( T & v, int ) { return &v; } }; template<> struct addressof_impl< addr_nullptr_t volatile > { typedef addr_nullptr_t volatile T; static BOOST_FORCEINLINE T * f( T & v, int ) { return &v; } }; template<> struct addressof_impl< addr_nullptr_t const volatile > { typedef addr_nullptr_t const volatile T; static BOOST_FORCEINLINE T * f( T & v, int ) { return &v; } }; #endif } // namespace detail template<class T> BOOST_FORCEINLINE T * addressof( T & v ) { #if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120)) return boost::detail::addressof_impl<T>::f( v, 0 ); #else return boost::detail::addressof_impl<T>::f( boost::detail::addr_impl_ref<T>( v ), 0 ); #endif } #if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) ) namespace detail { template<class T> struct addressof_addp { typedef T * type; }; } // namespace detail template< class T, std::size_t N > BOOST_FORCEINLINE typename detail::addressof_addp< T[N] >::type addressof( T (&t)[N] ) { return &t; } #endif // Borland doesn't like casting an array reference to a char reference // but these overloads work around the problem. #if defined( __BORLANDC__ ) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) template<typename T,std::size_t N> BOOST_FORCEINLINE T (*addressof(T (&t)[N]))[N] { return reinterpret_cast<T(*)[N]>(&t); } template<typename T,std::size_t N> BOOST_FORCEINLINE const T (*addressof(const T (&t)[N]))[N] { return reinterpret_cast<const T(*)[N]>(&t); } #endif } // namespace boost #endif // BOOST_CORE_ADDRESSOF_HPP