Skip to content

Commit bf2b237

Browse files
[mem.res.monotonic.buffer] Exposition-only style for private members
Renaming `upstream_rsrc`, `current_buffer`, and `next_buffer_size` to `upstream-rsrc`, `current-buffer`, and `next-buffer-size` respectively.
1 parent f602945 commit bf2b237

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

source/memory.tex

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8404,9 +8404,9 @@
84048404
\begin{codeblock}
84058405
namespace std::pmr {
84068406
class monotonic_buffer_resource : public memory_resource {
8407-
memory_resource* upstream_rsrc; // \expos
8408-
void* current_buffer; // \expos
8409-
size_t next_buffer_size; // \expos
8407+
memory_resource* @\exposid{upstream-rsrc}@; // \expos
8408+
void* @\exposid{current-buffer}@; // \expos
8409+
size_t @\exposid{next-buffer-size}@; // \expos
84108410

84118411
public:
84128412
explicit monotonic_buffer_resource(memory_resource* upstream);
@@ -8454,12 +8454,12 @@
84548454

84558455
\pnum
84568456
\effects
8457-
Sets \tcode{upstream_rsrc} to \tcode{upstream} and
8458-
\tcode{current_buffer} to \keyword{nullptr}.
8457+
Sets \exposid{upstream-rsrc} to \tcode{upstream} and
8458+
\exposid{current-buffer} to \keyword{nullptr}.
84598459
If \tcode{initial_size} is specified,
8460-
sets \tcode{next_buffer_size} to at least \tcode{initial_size};
8461-
otherwise sets \tcode{next_buffer_size} to an
8462-
\impldef{default \tcode{next_buffer_size} for a \tcode{monotonic_buffer_resource}} size.
8460+
sets \exposid{next-buffer-size} to at least \tcode{initial_size};
8461+
otherwise sets \exposid{next-buffer-size} to an
8462+
\impldef{default \exposid{next-buffer-size} for a \tcode{monotonic_buffer_resource}} size.
84638463
\end{itemdescr}
84648464

84658465
\indexlibraryctor{monotonic_buffer_resource}%
@@ -8475,10 +8475,10 @@
84758475

84768476
\pnum
84778477
\effects
8478-
Sets \tcode{upstream_rsrc} to \tcode{upstream},
8479-
\tcode{current_buffer} to \tcode{buffer}, and
8480-
\tcode{next_buffer_size} to \tcode{buffer_size} (but not less than 1),
8481-
then increases \tcode{next_buffer_size}
8478+
Sets \exposid{upstream-rsrc} to \tcode{upstream},
8479+
\exposid{current-buffer} to \tcode{buffer}, and
8480+
\exposid{next-buffer-size} to \tcode{buffer_size} (but not less than 1),
8481+
then increases \exposid{next-buffer-size}
84828482
by an \impldef{growth factor for \tcode{monotonic_buffer_resource}} growth factor (which need not be integral).
84838483
\end{itemdescr}
84848484

@@ -8504,14 +8504,14 @@
85048504
\begin{itemdescr}
85058505
\pnum
85068506
\effects
8507-
Calls \tcode{upstream_rsrc->deallocate()} as necessary
8507+
Calls \tcode{\exposid{upstream-rsrc}->deallocate()} as necessary
85088508
to release all allocated memory.
8509-
Resets \tcode{current_buffer} and \tcode{next_buffer_size}
8509+
Resets \exposid{current-buffer} and \exposid{next-buffer-size}
85108510
to their initial values at construction.
85118511

85128512
\pnum
85138513
\begin{note}
8514-
The memory is released back to \tcode{upstream_rsrc}
8514+
The memory is released back to \exposid{upstream-rsrc}
85158515
even if some blocks that were allocated from \tcode{*this}
85168516
have not been deallocated from \tcode{*this}.
85178517
\end{note}
@@ -8525,7 +8525,7 @@
85258525
\begin{itemdescr}
85268526
\pnum
85278527
\returns
8528-
The value of \tcode{upstream_rsrc}.
8528+
The value of \exposid{upstream-rsrc}.
85298529
\end{itemdescr}
85308530

85318531
\indexlibrarymember{do_allocate}{monotonic_buffer_resource}%
@@ -8536,15 +8536,15 @@
85368536
\begin{itemdescr}
85378537
\pnum
85388538
\effects
8539-
If the unused space in \tcode{current_buffer}
8539+
If the unused space in \exposid{current-buffer}
85408540
can fit a block with the specified \tcode{bytes} and \tcode{alignment},
8541-
then allocate the return block from \tcode{current_buffer};
8542-
otherwise set \tcode{current_buffer} to \tcode{upstream_rsrc->allocate(n, m)},
8543-
where \tcode{n} is not less than \tcode{max(bytes, next_buffer_size)} and
8541+
then allocate the return block from \exposid{current-buffer};
8542+
otherwise set \exposid{current-buffer} to \tcode{\exposid{upstream-rsrc}->allocate(n, m)},
8543+
where \tcode{n} is not less than \tcode{max(bytes, \exposid{next-buffer-size})} and
85448544
\tcode{m} is not less than \tcode{alignment},
8545-
and increase \tcode{next_buffer_size}
8545+
and increase \exposid{next-buffer-size}
85468546
by an \impldef{growth factor for \tcode{monotonic_buffer_resource}} growth factor (which need not be integral),
8547-
then allocate the return block from the newly-allocated \tcode{current_buffer}.
8547+
then allocate the return block from the newly-allocated \exposid{current-buffer}.
85488548

85498549
\pnum
85508550
\returns
@@ -8555,7 +8555,7 @@
85558555

85568556
\pnum
85578557
\throws
8558-
Nothing unless \tcode{upstream_rsrc->allocate()} throws.
8558+
Nothing unless \tcode{\exposid{upstream-rsrc}->allocate()} throws.
85598559
\end{itemdescr}
85608560

85618561
\indexlibrarymember{do_deallocate}{monotonic_buffer_resource}%

0 commit comments

Comments
 (0)