alignment_of.qbk

来自「Boost provides free peer-reviewed portab」· QBK 代码 · 共 35 行

QBK
35
字号
[/   Copyright 2007 John Maddock.  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).][section:alignment_of alignment_of]   template <class T>   struct alignment_of : public __integral_constant<std::size_t, ALIGNOF(T)> {};  __inherit Class template alignment_of inherits from `__integral_constant<std::size_t, ALIGNOF(T)>`, where `ALIGNOF(T)` is thealignment of type T.  ['Note: strictly speaking you should only rely on the value of `ALIGNOF(T)` being a multiple of the true alignment of T, althoughin practice it does compute the correct value in all the cases we know about.]__header ` #include <boost/type_traits/alignment_of.hpp>` or ` #include <boost/type_traits.hpp>`__examples[:`alignment_of<int>` inherits from `__integral_constant<std::size_t, ALIGNOF(int)>`.][:`alignment_of<char>::type` is the type `__integral_constant<std::size_t, ALIGNOF(char)>`.][:`alignment_of<double>::value` is an integral constant expression with value `ALIGNOF(double)`.][:`alignment_of<T>::value_type` is the type `std::size_t`.][endsect]

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?