align.qbk
22.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
[/
Copyright 2014-2017 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
]
[library Boost.Align
[quickbook 1.6]
[id align]
[copyright 2014-2017 Glen Joseph Fernandes]
[authors [Fernandes, Glen]]
[dirname align]
[license Distributed under the Boost Software License, Version 1.0.]]
[section Introduction]
The Boost Align C++ library provides functions, classes, templates, traits,
and macros, for the control, inspection, and diagnostic of memory alignment.
[endsect]
[section Rationale]
[heading Dynamic allocation]
C++11 added the ability to specify increased alignment (over-alignment) for
class types. Unfortunately, `::operator new` allocation functions, `new`
expressions and the Default Allocator, `std::allocator`, do not support
dynamic memory allocation of over-aligned data. This library provides
allocation functions and allocators that respect the alignment requirements of
a type and so are suitable for allocating memory for over-aligned types.
[variablelist
[[`aligned_alloc(alignment, size)`]
[Replaces `::operator new(size, std::nothrow)`]]
[[`aligned_free(pointer)`]
[Replaces `::operator delete(pointer, std::nothrow)`]]
[[`aligned_allocator<T>`][Replaces `std::allocator<T>`]]
[[`aligned_allocator_adaptor<Allocator>`][Replaces use of Allocator]]
[[`aligned_delete`][Replaces `std::default_delete<T>`]]]
[heading Pointer alignment]
C++11 provided `std::align` in the standard library to align a pointer value.
Unfortunately some C++ standard library implementations do not support it yet
(libstdc++ as far as gcc 4.8.0) and other standard library implementations
implement it incorrectly (dinkumware in msvc11.0). This library provides it
for those implementations and also for C++03 compilers where it is equally
useful.
[heading Querying alignment]
C++11 provided the `std::alignment_of` trait in the standard library to query
the alignment requirement of a type. Unfortunately some C++ standard library
vendors do not implement it in an entirely standard conforming manner, such as
for array types (libc++ as far as clang 3.4). Other vendor implementations
report incorrect values for certain types, such as pointer to members (msvc
14.0). This library provides it for those implementations and also for C++03
compilers where it is equally useful.
[heading Hinting alignment]
Allocating aligned memory is sometimes not enough to ensure that optimal code
is generated. Developers use specific compiler intrinsics to notify the
compiler of a given alignment property of a memory block. This library
provides a macro, `BOOST_ALIGN_ASSUME_ALIGNED`, to abstract that functionality
for compilers with the appropriate intrinsics.
[heading Checking alignment]
This library provides a function, `is_aligned` to test the alignment of a
pointer value. It is generally useful in assertions to validate that memory is
correctly aligned.
[endsect]
[section Examples]
[heading Aligned allocation]
To dynamically allocate storage with desired alignment, you can use the
`aligned_alloc` function:
[ordered_list
[`void* storage = boost::alignment::aligned_alloc(alignment, size);`]]
To deallocate storage allocated with the `aligned_alloc` function, use
the `aligned_free` function:
[ordered_list [`boost::alignment::aligned_free(storage);`]]
[heading Aligned allocator]
For C++ allocator aware code, you can use the `aligned_allocator` class
template for an allocator that respects over-alignment:
[ordered_list
[`std::vector<int128_t,
boost::alignment::aligned_allocator<int128_t> > vector;`]]
This template allows specifying minimum alignment for all dynamic allocations:
[ordered_list
[`std::vector<double,
boost::alignment::aligned_allocator<double, 64> > vector;`]]
[heading Aligned allocator adaptor]
To turn an allocator into an allocator that respects over-alignment, you can
use the `aligned_allocator_adaptor` class template:
[ordered_list
[`boost::alignment::aligned_allocator_adaptor<First> second(first);`]]
This template allows specifying minimum alignment for all dynamic
allocations:
[ordered_list
[`boost::alignment::aligned_allocator_adaptor<First, 64> second(first);`]]
[heading Aligned deleter]
For a deleter that can be paired with `aligned_alloc`, you can use the
`aligned_delete` class:
[ordered_list
[`std::unique_ptr<double, boost::alignment::aligned_delete> pointer;`]]
[heading Pointer alignment]
To advance a pointer to the next address with the desired alignment:
[ordered_list
[`void* pointer = storage;`]
[`std::size_t space = size;`]
[`void* result = boost::alignment::align(64, sizeof(double), pointer,
space);`]]
[heading Querying alignment]
To obtain the alignment of a given type at compie time, you can use:
[ordered_list [`boost::alignment::alignment_of<int128_t>::value`]]
If your compiler supports C++14 variable templates, you can also use:
[ordered_list [`boost::alignment::alignment_of_v<int128_t>`]]
[heading Hinting alignment]
To inform the compiler about the alignment of a pointer, you can use:
[ordered_list [`BOOST_ALIGN_ASSUME_ALIGNED(pointer, 64)`]]
[heading Checking alignment]
To check alignment of a pointer you can use the `is_aligned` function:
[ordered_list [`assert(boost::alignment::is_aligned(pointer, 64));`]]
[endsect]
[section Reference]
[section Functions]
[section align]
[variablelist
[[`void* align(std::size_t alignment, std::size_t size, void*& ptr,
std::size_t& space);`]
[[variablelist
[[Header][`#include <boost/align/align.hpp>`]]
[[Effects]
[If it is possible to fit `size` bytes of storage aligned by `alignment` into
the buffer pointed to by `ptr` with length `space`, the function updates `ptr`
to point to the first possible address of such storage and decreases `space` by
the number of bytes used for alignment. Otherwise, the function does nothing.]]
[[Requires]
[[itemized_list
[`alignment` shall be a power of two]
[`ptr` shall point to contiguous storage of at least `space` bytes]]]]
[[Returns]
[A null pointer if the requested aligned buffer would not fit into the
available space, otherwise the adjusted value of `ptr`.]]
[[Note]
[The function updates its `ptr` and `space` arguments so that it can be called
repeatedly with possibly different `alignment` and `size`arguments for the same
buffer.]]]]]]
[endsect]
[section align_up]
[variablelist
[[`template<class T> constexpr T align_up(T value, std::size_t alignment)
noexcept;`]
[[variablelist
[[Header][`#include <boost/align/align_up.hpp>`]]
[[Constraints][`T` is not a pointer type]]
[[Requires][`alignment` shall be a power of two]]
[[Returns][A value at or after `value` that is a multiple of `alignment`.]]]]]]
[endsect]
[section align_down]
[variablelist
[[`template<class T> constexpr T align_down(T value, std::size_t alignment)
noexcept;`]
[[variablelist
[[Header][`#include <boost/align/align_down.hpp>`]]
[[Constraints][`T` is not a pointer type]]
[[Requires][`alignment` shall be a power of two]]
[[Returns]
[A value at or before `value` that is a multiple of `alignment`.]]]]]]
[endsect]
[section aligned_alloc]
[variablelist
[[`void* aligned_alloc(std::size_t alignment, std::size_t size);`]
[[variablelist
[[Header][`#include <boost/align/aligned_alloc.hpp>`]]
[[Effects]
[Allocates space for an object whose alignment is specified by `alignment`,
whose size is specified by `size`, and whose value is indeterminate.]]
[[Requires][`alignment` shall be a power of two.]]
[[Returns][A null pointer or a pointer to the allocated space.]]
[[Note]
[On certain platforms, the space allocated may be slightly larger than
`size` bytes, to allow for alignment.]]]]]]
[endsect]
[section aligned_free]
[variablelist
[[`void aligned_free(void* ptr);`]
[[variablelist
[[Header][`#include <boost/align/aligned_alloc.hpp>`]]
[[Effects]
[Causes the space pointed to by `ptr` to be deallocated, that is, made
available for further allocation. If `ptr` is a null pointer, no action occurs.
Otherwise, if the argument does not match a pointer earlier returned by the
`aligned_alloc()` function, or if the space has been deallocated by a call to
`aligned_free()`, the behavior is undefined.]]
[[Requires]
[`ptr` is a null pointer or a pointer earlier returned by the `aligned_alloc()`
function that has not been deallocated by a call to `aligned_free()`.]]
[[Returns][The `aligned_free()` function returns no value.]]]]]]
[endsect]
[section is_aligned]
[variablelist
[[`bool is_aligned(const volatile void* ptr, std::size_t alignment) noexcept;`]
[[variablelist
[[Header][`#include <boost/align/is_aligned.hpp>`]]
[[Requires][`alignment` shall be a power of two.]]
[[Returns]
[`true` if `ptr` is aligned on the boundary specified by `alignment`, otherwise
`false`.]]]]]
[[`template<class T> constexpr bool is_aligned(T value, std::size_t alignment)
noexcept;`]
[[variablelist
[[Header][`#include <boost/align/is_aligned.hpp>`]]
[[Constraints][`T` is not a pointer type]]
[[Requires][`alignment` shall be a power of two.]]
[[Returns]
[`true` if the value of `value` is aligned on the boundary specified by
`alignment`, otherwise `false`.]]]]]]
[endsect]
[endsect]
[section Classes]
[section aligned_allocator]
[variablelist
[[`template<class T, std::size_t Alignment = 1> class aligned_allocator;`]
[[variablelist
[[Header][`#include <boost/align/aligned_allocator.hpp>`]]
[[Note]
[Using the aligned allocator with a minimum Alignment value is generally only
useful with containers that are not node-based such as `vector`. With
node-based containers, such as `list`, the node object would have the minimum
alignment instead of the value type object.]]]]]]
[heading Member types]
[ordered_list
[`typedef T value_type;`]
[`typedef T* pointer;`]
[`typedef const T* const_pointer;`]
[`typedef void* void_pointer;`]
[`typedef const void* const_void_pointer;`]
[`typedef std::add_lvalue_reference_t<T> reference;`]
[`typedef std::add_lvalue_reference_t<const T> const_reference;`]
[`typedef std::size_t size_type;`]
[`typedef std::ptrdiff_t difference_type;`]
[`typedef std::true_type propagate_on_container_move_assignment;`]
[`typedef std::true_type is_always_equal;`]
[`template<class U> struct rebind { typedef aligned_allocator<U, Alignment>
other; };`]]
[heading Constructors]
[variablelist
[[`aligned_allocator() = default;`]
[[variablelist [[Effects][Constructs the allocator.]]]]]
[[`template<class U> aligned_allocator(const aligned_allocator<U, Alignment>&)
noexcept;`]
[[variablelist [[Effects][Constructs the allocator.]]]]]]
[heading Member functions]
Except for the destructor, member functions of the aligned allocator shall not
introduce data races as a result of concurrent calls to those member functions
from different threads. Calls to these functions that allocate or deallocate a
particular unit of storage shall occur in a single total order, and each such
deallocation call shall happen before the next allocation (if any) in this
order.
[variablelist
[[`pointer allocate(size_type size, const_void_pointer = 0);`]
[[variablelist
[[Returns]
[A pointer to the initial element of an array of storage of size
`n * sizeof(T)`, aligned on the maximum of the minimum alignment specified and
the alignment of objects of type `T`.]]
[[Remark]
[The storage is obtained by calling `aligned_alloc(std::size_t,
std::size_t)`.]]
[[Throws][`std::bad_alloc` if the storage cannot be obtained.]]]]]
[[`void deallocate(pointer ptr, size_type);`]
[[variablelist
[[Requires]
[`ptr` shall be a pointer value obtained from `allocate()`.]]
[[Effects][Deallocates the storage referenced by `ptr`.]]
[[Remark][Uses `aligned_free(void*)`.]]]]]
[[`size_type max_size() const noexcept;`]
[[variablelist
[[Returns]
[The largest value `N` for which the call `allocate(N)` might succeed.]]]]]
[[`template<class U, class... Args> void construct(U* ptr, Args&&... args);`]
[[variablelist
[[Effects][`::new((void*)ptr) U(std::forward<Args>(args)...)`.]]]]]
[[`template<class U> void destroy(U* ptr);`]
[[variablelist [[Effects][`ptr->~U()`.]]]]]]
[heading Global operators]
[variablelist
[[`template<class T1, class T2, std::size_t Alignment> bool operator==(const
aligned_allocator<T1, Alignment>&, const aligned_allocator<T2, Alignment>&)
noexcept;`]
[[variablelist [[Returns][`true`]]]]]
[[`template<class T1, class T2, std::size_t Alignment> bool operator!=(const
aligned_allocator<T1, Alignment>&, const aligned_allocator<T2, Alignment>&)
noexcept;`]
[[variablelist [[Returns][`false`]]]]]]
[endsect]
[section aligned_allocator_adaptor]
[variablelist
[[`template<class Allocator, std::size_t Alignment = 1> class
aligned_allocator_adaptor;`]
[[variablelist
[[Header][`#include <boost/align/aligned_allocator_adaptor.hpp>`]]
[[Note]
[This adaptor can be used with a C++11 Allocator whose pointer type is a smart
pointer but the adaptor can choose to expose only raw pointer types.]]]]]]
[heading Member types]
[ordered_list
[`typedef typename Allocator::value_type value_type;`]
[`typedef value_type* pointer;`]
[`typedef const value_type* const_pointer;`]
[`typedef void* void_pointer;`]
[`typedef const void* const_void_pointer;`]
[`typedef std::size_t size_type;`]
[`typedef std::ptrdiff_t difference_type;`]
[`template<class U> struct rebind { typedef aligned_allocator_adaptor<typename
std::allocator_traits<Allocator>::template rebind_alloc<U>, Alignment>
other; };`]]
[heading Constructors]
[variablelist
[[`aligned_allocator_adaptor() = default;`]
[[variablelist [[Effects][Value-initializes the `Allocator` base class.]]]]]
[[`template<class A> aligned_allocator_adaptor(A&& alloc) noexcept;`]
[[variablelist [[Requires][`Allocator` shall be constructible from `A`.]]
[[Effects]
[Initializes the `Allocator` base class with `std::forward<A>(alloc)`.]]]]]
[[`template<class U> aligned_allocator_adaptor(const
aligned_allocator_adaptor<U, Alignment>& other) noexcept;`]
[[variablelist
[[Requires][`Allocator` shall be constructible from `A`.]]
[[Effects][Initializes the `Allocator` base class with `other.base()`.]]]]]]
[heading Member functions]
[variablelist
[[`Allocator& base() noexcept;`]
[[variablelist [[Returns][`static_cast<Allocator&>(*this)`]]]]]
[[`const Allocator& base() const noexcept;`]
[[variablelist [[Returns][`static_cast<const Allocator&>(*this)`]]]]]
[[`pointer allocate(size_type size);`]
[[variablelist
[[Returns]
[A pointer to the initial element of an array of storage of size
`n * sizeof(value_type)`, aligned on the maximum of the minimum alignment
specified and the alignment of objects of type `value_type`.]]
[[Remark]
[The storage is obtained by calling `A2::allocate()` on an object `a2`, where
`a2` of type `A2` is a rebound copy of `base()` where its `value_type` is
implementation defined.]]
[[Throws]
[Throws an exception thrown from `A2::allocate()` if the storage cannot be
obtained.]]]]]
[[`pointer allocate(size_type size, const_void_pointer hint);`]
[[variablelist
[[Requires]
[`hint` is a value obtained by calling `allocate()` on any equivalent allocator
object, or else a null pointer.]]
[[Returns]
[A pointer to the initial element of an array of storage of size
`n * sizeof(value_type)`, aligned on the maximum of the minimum alignment
specified and the alignment of objects of type `value_type`.]]
[[Remark]
[The storage is obtained by calling `A2::allocate()` on an object `a2`, where
`a2` of type `A2` is a rebound copy of `base()` where its `value_type` is an
implementation defined.]]
[[Throws]
[Throws an exception thrown from `A2::allocate()` if the storage cannot be
obtained.]]]]]
[[`void deallocate(pointer ptr, size_type size);`]
[[variablelist
[[Requires]
[[itemized_list
[`ptr` shall be a pointer value obtained from `allocate()`]
[`size` shall equal the value passed as the first argument to the invocation of
`allocate()` which returned `ptr`.]]]]
[[Effects][Deallocates the storage referenced by `ptr`.]]
[[Note]
[Uses `A2::deallocate()` on an object `a2`, where `a2` of type `A2` is a
rebound copy of `base()` where its `value_type` is implementation
defined.]]]]]]
[heading Global operators]
[variablelist
[[`template<class A1, class A2, std::size_t Alignment> bool operator==(const
aligned_allocator_adaptor<A1, Alignment>& a1, const
aligned_allocator_adaptor<A2, Alignment>& a2) noexcept;`]
[[variablelist [[Returns][`a1.base() == a2.base()`]]]]]
[[`template<class A1, class A2, std::size_t Alignment> bool operator!=(const
aligned_allocator_adaptor<A1, Alignment>& a1, const
aligned_allocator_adaptor<A2, Alignment>& a2) noexcept;`]
[[variablelist [[Returns][`!(a1 == a2)`]]]]]]
[endsect]
[section aligned_delete]
[variablelist
[[`class aligned_delete;`]
[[variablelist [[Header][`#include <boost/align/aligned_delete.hpp>`]]]]]]
[heading Member operators]
[variablelist
[[`template<class T> void operator()(T* ptr) noexcept(noexcept(ptr->~T()));`]
[[variablelist
[[Effects]
[Calls `~T()` on `ptr` to destroy the object and then calls `aligned_free()` on
`ptr` to free the allocated memory.]]
[[Note][If `T` is an incomplete type, the program is ill-formed.]]]]]]
[endsect]
[endsect]
[section Traits]
[section alignment_of]
[variablelist
[[`template<class T> struct alignment_of;`]
[[variablelist
[[Header][`#include <boost/align/alignment_of.hpp>`]]
[[Value]
[The alignment requirement of the type `T` as an integral constant of type
`std::size_t`. When `T` is a reference array type, the value shall be the
alignment of the referenced type. When `T` is an array type, the value shall be
the alignment of the element type.]]
[[Requires]
[`T` shall be a complete object type, or an array thereof, or a reference to
one of those types.]]]]]]
[endsect]
[endsect]
[section Macros]
[section BOOST_ALIGN_ASSUME_ALIGNED]
[variablelist
[[`BOOST_ALIGN_ASSUME_ALIGNED(ptr, alignment)`]
[[variablelist
[[Header][`#include <boost/align/assume_aligned.hpp>`]]
[[Requires]
[[itemized_list [`alignment` shall be a power of two]
[`ptr` shall be mutable]]]]
[[Effects]
[`ptr` may be modified in an implementation specific way to inform the compiler
of its alignment.]]]]]]
[endsect]
[endsect]
[endsect]
[section Vocabulary]
[heading \[basic.align\]]
Object types have /alignment requirements/ which place restrictions on the
addresses at which an object of that type may be allocated. An /alignment/ is
an implementation-defined integer value representing the number of bytes
between successive addresses at which a given object can be allocated. An
object type imposes an alignment requirement on every object of that type;
stricter alignment can be requested using the alignment specifier.
A /fundamental alignment/ is represented by an alignment less than or equal to
the greatest alignment supported by the implementation in all contexts, which
is equal to `alignof(std::max_align_t)`. The alignment required for a type
might be different when it is used as the type of a complete object and when
it is used as the type of a subobject.
\[['Example:]
[ordered_list
[`struct B { long double d; };`]
[`struct D : virtual B { char c; };`]]
When `D` is the type of a complete object, it will have a subobject of type
`B`, so it must be aligned appropriately for a `long double`. If `D` appears
as a subobject of another object that also has `B` as a virtual base class,
the `B` subobject might be part of a different subobject, reducing the
alignment requirements on the `D` subobject. \u2014['end example]\] The result
of the `alignof` operator reflects the alignment requirement of the type in
the complete-object case.
An /extended alignment/ is represented by an alignment greater than
`alignof(std::max_align_t)`. It is implementation-defined whether any extended
alignments are supported and the contexts in which they are supported. A type
having an extended alignment requirement is an /over-aligned type/. \[['Note:]
Every over-aligned type is or contains a class type to which extended
alignment applies (possibly through a non-static data member). \u2014['end
note]\]
Alignments are represented as values of the type `std::size_t`. Valid
alignments include only those values returned by an `alignof` expression for
the fundamental types plus an additional implementation-defined set of values,
which may be empty. Every alignment value shall be a non-negative integral
power of two.
Alignments have an order from /weaker/ to /stronger/ or /stricter/ alignments.
Stricter alignments have larger alignment values. An address that satisfies an
alignment requirement also satisfies any weaker valid alignment requirement.
The alignment requirement of a complete type can be queried using an `alignof`
expression. Furthermore, the types `char`, `signed char`, and `unsigned char`
shall have the weakest alignment requirement. \[['Note:] This enables the
character types to be used as the underlying type for an aligned memory area.
\u2014['end note]\]
Comparing alignments is meaningful and provides the obvious results:
* Two alignments are equal when their numeric values are equal.
* Two alignments are different when their numeric values are not equal.
* When an alignment is larger than another it represents a stricter
alignment.
\[['Note:] The runtime pointer alignment function can be used to obtain an
aligned pointer within a buffer; the aligned-storage templates in the library
can be used to obtain aligned storage. \u2014['end note]\]
If a request for a specific extended alignment in a specific context is not
supported by an implementation, the program is ill-formed. Additionally, a
request for runtime allocation of dynamic storage for which the requested
alignment cannot be honored shall be treated as an allocation failure.
[endsect]
[section Compatibility]
This library has been tested with the following C++ implementations:
[variablelist
[[Compilers][gcc, clang, msvc, intel]]
[[Libraries][libstdc++, libc++, dinkumware]]
[[Systems][linux, windows, osx]]
[[Platforms][x64, x86, arm]]
[[Standards][c++98, c++03, c++11, c++14, c++17]]]
[endsect]
[section Acknowledgments]
Thank you to everyone who reviewed the design, code, examples, tests, or
documentation, including:
* Peter Dimov
* Andrey Semashev
* Bjorn Reese
* Steven Watanabe
* Antony Polukhin
* Lars Viklund
* Michael Spencer
* Paul A. Bristow
Thank you to Ahmed Charles for serving as the review manager for the formal
review of the library.
[endsect]
[section History]
[variablelist
[[Boost 1.61]
[Functions for aligning up, down, and testing alignment of integral values.]]
[[Boost 1.59]
[Joel Falcou and Charly Chevalier contributed the alignment hint macro.]]
[[Boost 1.56]
[Glen Fernandes implemented and contributed the Align library to Boost.]]]
[endsect]