Skip to content

Commit

Permalink
Fix Issue 16017 - package functions show up in std.experimental.alloc…
Browse files Browse the repository at this point in the history
…ator.common docs
  • Loading branch information
wilzbach committed Jan 12, 2018
1 parent aeb7b9b commit 639c07e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions std/experimental/allocator/common.d
Expand Up @@ -91,7 +91,7 @@ size_t goodAllocSize(A)(auto ref A a, size_t n)
return n.roundUpToMultipleOf(a.alignment);
}

/**
/*
Returns s rounded up to a multiple of base.
*/
@safe @nogc nothrow pure
Expand All @@ -111,7 +111,7 @@ unittest
assert(118.roundUpToMultipleOf(11) == 121);
}

/**
/*
Returns `n` rounded up to a multiple of alignment, which must be a power of 2.
*/
@safe @nogc nothrow pure
Expand All @@ -136,7 +136,7 @@ unittest
assert(118.roundUpToAlignment(64) == 128);
}

/**
/*
Returns `n` rounded down to a multiple of alignment, which must be a power of 2.
*/
@safe @nogc nothrow pure
Expand All @@ -156,7 +156,7 @@ unittest
assert(63.roundDownToAlignment(64) == 0);
}

/**
/*
Advances the beginning of `b` to start at alignment `a`. The resulting buffer
may therefore be shorter. Returns the adjusted buffer, or null if obtaining a
non-empty buffer is impossible.
Expand All @@ -180,7 +180,7 @@ package void[] roundUpToAlignment(void[] b, uint a)
assert(roundUpToAlignment(buf, 128) !is null);
}

/**
/*
Like `a / b` but rounds the result up, not down.
*/
@safe @nogc nothrow pure
Expand All @@ -190,7 +190,7 @@ package size_t divideRoundUp(size_t a, size_t b)
return (a + b - 1) / b;
}

/**
/*
Returns `s` rounded up to a multiple of `base`.
*/
@nogc nothrow pure
Expand All @@ -212,7 +212,7 @@ nothrow pure
assert(roundStartToMultipleOf(p, 16) is p);
}

/**
/*
Returns $(D s) rounded up to the nearest power of 2.
*/
@safe @nogc nothrow pure
Expand Down Expand Up @@ -249,7 +249,7 @@ unittest
assert(((size_t.max >> 1) + 1).roundUpToPowerOf2 == (size_t.max >> 1) + 1);
}

/**
/*
Returns the number of trailing zeros of $(D x).
*/
@safe @nogc nothrow pure
Expand All @@ -273,7 +273,7 @@ unittest
assert(trailingZeros(4) == 2);
}

/**
/*
Returns `true` if `ptr` is aligned at `alignment`.
*/
@nogc nothrow pure
Expand All @@ -282,7 +282,7 @@ package bool alignedAt(T)(T* ptr, uint alignment)
return cast(size_t) ptr % alignment == 0;
}

/**
/*
Returns the effective alignment of `ptr`, i.e. the largest power of two that is
a divisor of `ptr`.
*/
Expand All @@ -299,7 +299,7 @@ package uint effectiveAlignment(void* ptr)
assert(effectiveAlignment(&x) >= int.alignof);
}

/**
/*
Aligns a pointer down to a specified alignment. The resulting pointer is less
than or equal to the given pointer.
*/
Expand All @@ -311,7 +311,7 @@ package void* alignDownTo(void* ptr, uint alignment)
return cast(void*) (cast(size_t) ptr & ~(alignment - 1UL));
}

/**
/*
Aligns a pointer up to a specified alignment. The resulting pointer is greater
than or equal to the given pointer.
*/
Expand Down

0 comments on commit 639c07e

Please sign in to comment.