Skip to content

Commit 1138f7b

Browse files
committed
Fix Doxygen errors
1 parent 5eceadc commit 1138f7b

8 files changed

Lines changed: 40 additions & 26 deletions

File tree

include/foonathan/memory/allocator_storage.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ namespace foonathan
241241
/// The \c Mutex will be locked during the operation.
242242
/// \requires The allocator must be composable,
243243
/// i.e. \ref is_composable() must return `true`.
244-
/// \notes This check is done at compile-time where possible,
244+
/// \note This check is done at compile-time where possible,
245245
/// and at runtime in the case of type-erased storage.
246246
FOONATHAN_ENABLE_IF(composable::value)
247247
void* try_allocate_node(std::size_t size, std::size_t alignment) FOONATHAN_NOEXCEPT
@@ -322,7 +322,7 @@ namespace foonathan
322322

323323
/// \returns Whether or not the stored allocator is composable,
324324
/// that is you can use the compositioning functions.
325-
/// \notes Due to type-erased allocators,
325+
/// \note Due to type-erased allocators,
326326
/// this function can not be `constexpr`.
327327
bool is_composable() const FOONATHAN_NOEXCEPT
328328
{

include/foonathan/memory/fallback_allocator.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#ifndef FOONATHAN_MEMORY_FALLBACK_ALLOCATOR_HPP_INCLUDED
66
#define FOONATHAN_MEMORY_FALLBACK_ALLOCATOR_HPP_INCLUDED
77

8+
/// \file
9+
//// Class template \ref foonathan::memory::fallback_allocator.
10+
811
#include "detail/ebo_storage.hpp"
912
#include "detail/utility.hpp"
1013
#include "allocator_traits.hpp"

include/foonathan/memory/iteration_allocator.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#ifndef FOONATHAN_MEMORY_ITERATION_ALLOCATOR_HPP_INCLUDED
66
#define FOONATHAN_MEMORY_ITERATION_ALLOCATOR_HPP_INCLUDED
77

8+
/// \file
9+
/// Class template \ref foonathan::memory::iteration_allocator.
10+
811
#include "detail/debug_helpers.hpp"
912
#include "detail/memory_stack.hpp"
1013
#include "default_allocator.hpp"
@@ -93,7 +96,7 @@ namespace foonathan
9396
/// \effects Goes to the next internal stack.
9497
/// This will clear the stack whose \ref max_iterations() lifetime has reached,
9598
/// and use it for all allocations in this iteration.
96-
/// \notes This function should be called at the end of the loop.
99+
/// \note This function should be called at the end of the loop.
97100
void next_iteration() FOONATHAN_NOEXCEPT
98101
{
99102
cur_ = (cur_ + 1) % N;

include/foonathan/memory/joint_allocator.hpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#ifndef FOONATHAN_MEMORY_JOINT_ALLOCATOR_HPP_INCLUDED
66
#define FOONATHAN_MEMORY_JOINT_ALLOCATOR_HPP_INCLUDED
77

8+
/// \file
9+
/// Class template \ref foonathan::memory::joint_ptr, \ref foonathan::memory::joint_allocator and related.
10+
811
#include <initializer_list>
912
#include <new>
1013

@@ -135,7 +138,7 @@ namespace foonathan
135138
protected:
136139
/// \effects Creates the base class,
137140
/// the tag type cannot be created by the user.
138-
/// \notes This ensures that you cannot create joint types yourself.
141+
/// \note This ensures that you cannot create joint types yourself.
139142
joint_type(joint j) FOONATHAN_NOEXCEPT;
140143

141144
joint_type(const joint_type&) = delete;
@@ -244,7 +247,7 @@ namespace foonathan
244247
/// @{
245248
/// \effects Reserves memory for the object and the additional size,
246249
/// and creates the object by forwarding the arguments to its constructor.
247-
/// The \cocnept{concept_rawallocator,RawAllocator} will be used for the allocation.
250+
/// The \concept{concept_rawallocator,RawAllocator} will be used for the allocation.
248251
template <typename... Args>
249252
joint_ptr(allocator_type& alloc, joint_size additional_size, Args&&... args)
250253
: joint_ptr(alloc)
@@ -537,7 +540,7 @@ namespace foonathan
537540
}
538541

539542
/// \effects Deallocates the node, if possible.
540-
/// \notes It is only possible if it was the last allocation.
543+
/// \note It is only possible if it was the last allocation.
541544
void deallocate_node(void* ptr, std::size_t size, std::size_t) FOONATHAN_NOEXCEPT
542545
{
543546
FOONATHAN_MEMORY_ASSERT(stack_);
@@ -585,7 +588,7 @@ namespace foonathan
585588
/// Specialization of \ref is_thread_safe_allocator to mark \ref joint_allocator as thread safe.
586589
/// This is an optimization to get rid of the mutex in \ref allocator_reference,
587590
/// as joint allocator must not be shared between threads.
588-
/// \notes The allocator is *not* thread safe, it just must not be shared.
591+
/// \note The allocator is *not* thread safe, it just must not be shared.
589592
template <>
590593
struct is_thread_safe_allocator<joint_allocator> : std::true_type
591594
{
@@ -600,7 +603,7 @@ namespace foonathan
600603
/// A joint allocator does not propagate on assignment
601604
/// and it is not allowed to use the regular copy/move constructor of allocator aware containers,
602605
/// instead it needs the copy/move constructor with allocator.
603-
/// \notes This is required because the container constructor will end up copying/moving the allocator.
606+
/// \note This is required because the container constructor will end up copying/moving the allocator.
604607
/// But this is not allowed as you need the allocator with the correct joined memory.
605608
/// Copying can be customized (i.e. forbidden), but sadly not move, so keep that in mind.
606609
/// \ingroup memory allocator

include/foonathan/memory/memory_pool.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ namespace foonathan
156156

157157
/// \effects Deallocates a single \concept{concept_node,node} but it does not be a result of a previous call to \ref allocate_node().
158158
/// \returns `true` if the node could be deallocated, `false` otherwise.
159-
/// \notes Some free list implementations can deallocate any memory,
159+
/// \note Some free list implementations can deallocate any memory,
160160
/// doesn't matter where it is coming from.
161161
bool try_deallocate_node(void* ptr) FOONATHAN_NOEXCEPT
162162
{
@@ -177,7 +177,7 @@ namespace foonathan
177177

178178
/// \effects Deallocates an \concept{concept_array,array} but it does not be a result of a previous call to \ref allocate_array().
179179
/// \returns `true` if the node could be deallocated, `false` otherwise.
180-
/// \notes Some free list implementations can deallocate any memory,
180+
/// \note Some free list implementations can deallocate any memory,
181181
/// doesn't matter where it is coming from.
182182
bool try_deallocate_array(void* ptr, std::size_t n) FOONATHAN_NOEXCEPT
183183
{

include/foonathan/memory/memory_stack.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ namespace foonathan
338338
}
339339

340340
/// \returns Whether or not the unwinder will actually unwind.
341-
/// \notes It will not unwind if it is in the moved-from state.
341+
/// \note It will not unwind if it is in the moved-from state.
342342
bool will_unwind() const FOONATHAN_NOEXCEPT
343343
{
344344
return stack_ != nullptr;

include/foonathan/memory/segregator.hpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#ifndef FOONATHAN_MEMORY_SEGREGATOR_HPP_INCLUDED
66
#define FOONATHAN_MEMORY_SEGREGATOR_HPP_INCLUDED
77

8+
/// \file
9+
/// Class template \ref foonathan::memory::segregator and related classes.
10+
811
#include "detail/ebo_storage.hpp"
912
#include "detail/utility.hpp"
1013
#include "allocator_traits.hpp"
@@ -33,15 +36,15 @@ namespace foonathan
3336

3437
/// \returns `true` if `size` is less then or equal to the maximum size,
3538
/// `false` otherwise.
36-
/// \notes A return value of `true` means that the allocator will be used for the allocation.
39+
/// \note A return value of `true` means that the allocator will be used for the allocation.
3740
bool use_allocate_node(std::size_t size, std::size_t) FOONATHAN_NOEXCEPT
3841
{
3942
return size <= max_size_;
4043
}
4144

4245
/// \returns `true` if `count * size` is less then or equal to the maximum size,
4346
/// `false` otherwise.
44-
/// \notes A return value of `true` means that the allocator will be used for the allocation.
47+
/// \note A return value of `true` means that the allocator will be used for the allocation.
4548
bool use_allocate_array(std::size_t count, std::size_t size,
4649
std::size_t) FOONATHAN_NOEXCEPT
4750
{
@@ -115,7 +118,7 @@ namespace foonathan
115118
}
116119
};
117120

118-
/// A \concept{concept_rawallocator,RawAllocator} that either uses the \concept{concept_segregatable,Segregatable| or the other `RawAllocator`.
121+
/// A \concept{concept_rawallocator,RawAllocator} that either uses the \concept{concept_segregatable,Segregatable} or the other `RawAllocator`.
119122
/// It is a faster alternative to \ref fallback_allocator that doesn't require a composable allocator
120123
/// and decides about the allocator to use purely with the `Segregatable` based on size and alignment.
121124
/// \ingroup memory adapter
@@ -183,7 +186,7 @@ namespace foonathan
183186

184187
/// @{
185188
/// \returns The maximum value of the fallback.
186-
/// \notes It assumes that the fallback will be used for larger allocations,
189+
/// \note It assumes that the fallback will be used for larger allocations,
187190
/// and the `Segregatable` for smaller ones.
188191
std::size_t max_node_size() const
189192
{
@@ -367,7 +370,7 @@ namespace foonathan
367370
/// Then the result is a simple \ref binary_segregator with those arguments.
368371
/// If you pass more than one, the last one must be a `RawAllocator` all others `Segregatable`,
369372
/// the result is `binary_segregator<Head, segregator<Tail...>>`.
370-
/// \notes It will result in an allocator that tries each `Segregatable` in the order specified
373+
/// \note It will result in an allocator that tries each `Segregatable` in the order specified
371374
/// using the last parameter as final fallback.
372375
/// \ingroup memory adapter
373376
template <class... Allocators>

include/foonathan/memory/temporary_allocator.hpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,14 @@ namespace foonathan
169169

170170
/// Manually takes care of the lifetime of the per-thread \ref temporary_stack.
171171
/// The constructor will create it, if not already done, and the destructor will destroy it, if not already done.
172-
/// \notes If there are multiple objects in a thread,
172+
/// \note If there are multiple objects in a thread,
173173
/// this will lead to unnecessary construction and destruction of the stack.
174174
/// It is thus adviced to create one object on the top-level function of the thread, e.g. in `main()`.
175-
/// \notes If `FOONATHAN_MEMORY_TEMPORARY_STACK_MODE == 2`, it is not necessary to use this class,
175+
/// \note If `FOONATHAN_MEMORY_TEMPORARY_STACK_MODE == 2`, it is not necessary to use this class,
176176
/// the nifty counter will clean everything upon program termination.
177177
/// But it can still be used as an optimization if you have a thread that is terminated long before program exit.
178178
/// The automatic clean up will only occur much later.
179-
/// \notes If `FOONATHAN_MEMORY_TEMPORARY_STACK_MODE == 0`, the use of this class has no effect,
179+
/// \note If `FOONATHAN_MEMORY_TEMPORARY_STACK_MODE == 0`, the use of this class has no effect,
180180
/// because the per-thread stack is disabled.
181181
/// \relatesalso temporary_stack
182182
class temporary_stack_initializer
@@ -186,19 +186,21 @@ namespace foonathan
186186

187187
static const struct defer_create_t
188188
{
189-
defer_create_t() FOONATHAN_NOEXCEPT {}
189+
defer_create_t() FOONATHAN_NOEXCEPT
190+
{
191+
}
190192
} defer_create;
191193

192194
/// \effects Does not create the per-thread stack.
193195
/// It will be created by the first call to \ref get_temporary_stack() in the current thread.
194-
/// \notes If `FOONATHAN_MEMORY_TEMPORARY_STACK_MODE == 0`, this function has no effect.
196+
/// \note If `FOONATHAN_MEMORY_TEMPORARY_STACK_MODE == 0`, this function has no effect.
195197
temporary_stack_initializer(defer_create_t) FOONATHAN_NOEXCEPT
196198
{
197199
}
198200

199201
/// \effects Creates the per-thread stack with the given default size if it wasn't already created.
200202
/// \requires `initial_size` must not be `0` if `FOONATHAN_MEMORY_TEMPORARY_STACK_MODE != 0`.
201-
/// \notes If `FOONATHAN_MEMORY_TEMPORARY_STACK_MODE == 0`, this function will issue a warning in debug mode.
203+
/// \note If `FOONATHAN_MEMORY_TEMPORARY_STACK_MODE == 0`, this function will issue a warning in debug mode.
202204
/// This can be disabled by passing `0` as the initial size.
203205
temporary_stack_initializer(std::size_t initial_size = default_stack_size);
204206

@@ -213,7 +215,7 @@ namespace foonathan
213215
/// if it wasn't already created.
214216
/// \returns The per-thread \ref temporary_stack.
215217
/// \requires There must be a per-thread temporary stack (\ref FOONATHAN_MEMORY_TEMPORARY_STACK_MODE must not be equal to `0`).
216-
/// \notes If \ref FOONATHAN_MEMORY_TEMPORARY_STACK_MODE is equal to `1`,
218+
/// \note If \ref FOONATHAN_MEMORY_TEMPORARY_STACK_MODE is equal to `1`,
217219
/// this function can create the temporary stack.
218220
/// But if there is no \ref temporary_stack_initializer, it won't be destroyed.
219221
/// \relatesalso temporary_stack
@@ -248,15 +250,15 @@ namespace foonathan
248250
void* allocate(std::size_t size, std::size_t alignment);
249251

250252
/// \returns Whether or not the allocator object is active.
251-
/// \notes The active allocator object is the last object created for one stack.
253+
/// \note The active allocator object is the last object created for one stack.
252254
/// Moving changes the active allocator.
253255
bool is_active() const FOONATHAN_NOEXCEPT;
254256

255257
/// \effects Instructs it to release unnecessary memory after automatic unwinding occurs.
256258
/// This will effectively forward to \ref memory_stack::shrink_to_fit() of the internal stack.
257-
/// \notes Like the use of the \ref temporary_stack_initializer this can be used as an optimization,
259+
/// \note Like the use of the \ref temporary_stack_initializer this can be used as an optimization,
258260
/// to tell when the thread's \ref temporary_stack isn't needed anymore and can be destroyed.
259-
/// \notes It doesn't call shrink to fit immediately, only in the destructor!
261+
/// \note It doesn't call shrink to fit immediately, only in the destructor!
260262
void shrink_to_fit() FOONATHAN_NOEXCEPT;
261263

262264
/// \returns The internal stack the temporary allocator is using.

0 commit comments

Comments
 (0)