mirror of
https://github.com/boostorg/core.git
synced 2025-07-31 13:27:29 +02:00
Document BOOST_CORE_ALIGNOF
This commit is contained in:
33
doc/alignof.qbk
Normal file
33
doc/alignof.qbk
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
[/
|
||||||
|
Copyright 2023 Peter Dimov
|
||||||
|
Distributed under the Boost Software License, Version 1.0.
|
||||||
|
https://boost.org/LICENSE_1_0.txt
|
||||||
|
]
|
||||||
|
|
||||||
|
[section:alignof alignof]
|
||||||
|
|
||||||
|
[simplesect Authors]
|
||||||
|
|
||||||
|
* Peter Dimov
|
||||||
|
|
||||||
|
[endsimplesect]
|
||||||
|
|
||||||
|
[section Header <boost/core/alignof.hpp>]
|
||||||
|
|
||||||
|
The header `<boost/core/alignof.hpp>` defines the macro `BOOST_CORE_ALIGNOF`,
|
||||||
|
a portable equivalent of the `alignof` operator from C++11.
|
||||||
|
|
||||||
|
[section Example]
|
||||||
|
|
||||||
|
``
|
||||||
|
#include <boost/core/alignof.hpp>
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
|
constexpr std::size_t alignment_of_double = BOOST_CORE_ALIGNOF(double);
|
||||||
|
``
|
||||||
|
|
||||||
|
[endsect]
|
||||||
|
|
||||||
|
[endsect]
|
||||||
|
|
||||||
|
[endsect]
|
@@ -17,6 +17,7 @@
|
|||||||
* Marked `boost::ref` member functions and associated methods with `noexcept`.
|
* Marked `boost::ref` member functions and associated methods with `noexcept`.
|
||||||
* Marked `boost::swap` function with `noexcept`, depending on whether the type supports a non-throwing swap operation.
|
* Marked `boost::swap` function with `noexcept`, depending on whether the type supports a non-throwing swap operation.
|
||||||
* Added `boost::core::launder`, a portable implementation of `std::launder`.
|
* Added `boost::core::launder`, a portable implementation of `std::launder`.
|
||||||
|
* Added `BOOST_CORE_ALIGNOF`, a portable implementation of `alignof`.
|
||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
|
||||||
|
@@ -41,6 +41,7 @@ criteria for inclusion is that the utility component be:
|
|||||||
[include changes.qbk]
|
[include changes.qbk]
|
||||||
|
|
||||||
[include addressof.qbk]
|
[include addressof.qbk]
|
||||||
|
[include alignof.qbk]
|
||||||
[include allocator_access.qbk]
|
[include allocator_access.qbk]
|
||||||
[include allocator_traits.qbk]
|
[include allocator_traits.qbk]
|
||||||
[include bit.qbk]
|
[include bit.qbk]
|
||||||
|
Reference in New Issue
Block a user