Server IP : 172.67.216.182 / Your IP : 172.71.152.94 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/ |
Upload File : |
//----------------------------------------------------------------------------- // boost aligned_storage.hpp header file // See http://www.boost.org for updates, documentation, and revision history. //----------------------------------------------------------------------------- // // Copyright (c) 2002-2003 // Eric Friedman, Itay Maman // // 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) #ifndef BOOST_ALIGNED_STORAGE_HPP #define BOOST_ALIGNED_STORAGE_HPP #include <cstddef> // for std::size_t #include "boost/config.hpp" #include "boost/detail/workaround.hpp" #include "boost/type_traits/alignment_of.hpp" #include "boost/type_traits/type_with_alignment.hpp" #include "boost/type_traits/is_pod.hpp" #include "boost/mpl/eval_if.hpp" #include "boost/mpl/identity.hpp" #include "boost/type_traits/detail/bool_trait_def.hpp" namespace boost { namespace detail { namespace aligned_storage { BOOST_STATIC_CONSTANT( std::size_t , alignment_of_max_align = ::boost::alignment_of<max_align>::value ); // // To be TR1 conforming this must be a POD type: // template < std::size_t size_ , std::size_t alignment_ > struct aligned_storage_imp { union data_t { char buf[size_]; typename ::boost::mpl::eval_if_c< alignment_ == std::size_t(-1) , ::boost::mpl::identity< ::boost::detail::max_align > , ::boost::type_with_alignment<alignment_> >::type align_; } data_; void* address() const { return const_cast<aligned_storage_imp*>(this); } }; template< std::size_t alignment_ > struct aligned_storage_imp<0u,alignment_> { /* intentionally empty */ void* address() const { return 0; } }; }} // namespace detail::aligned_storage template < std::size_t size_ , std::size_t alignment_ = std::size_t(-1) > class aligned_storage : #ifndef __BORLANDC__ private #else public #endif ::boost::detail::aligned_storage::aligned_storage_imp<size_, alignment_> { public: // constants typedef ::boost::detail::aligned_storage::aligned_storage_imp<size_, alignment_> type; BOOST_STATIC_CONSTANT( std::size_t , size = size_ ); BOOST_STATIC_CONSTANT( std::size_t , alignment = ( alignment_ == std::size_t(-1) ? ::boost::detail::aligned_storage::alignment_of_max_align : alignment_ ) ); private: // noncopyable aligned_storage(const aligned_storage&); aligned_storage& operator=(const aligned_storage&); public: // structors aligned_storage() { } ~aligned_storage() { } public: // accessors void* address() { return static_cast<type*>(this)->address(); } const void* address() const { return static_cast<const type*>(this)->address(); } }; // // Make sure that is_pod recognises aligned_storage<>::type // as a POD (Note that aligned_storage<> itself is not a POD): // template <std::size_t size_, std::size_t alignment_> struct is_pod< ::boost::detail::aligned_storage::aligned_storage_imp<size_,alignment_> > BOOST_TT_AUX_BOOL_C_BASE(true) { BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(true) }; } // namespace boost #include "boost/type_traits/detail/bool_trait_undef.hpp" #endif // BOOST_ALIGNED_STORAGE_HPP