Skip to content

Commit 4b53960

Browse files
committed
Italicize resource_adaptor_imp to clarify that the name isn't normative.
Fixes cplusplus#17.
1 parent 6a47125 commit 4b53960

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

Diff for: memory.html

+18-18
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ <h1>Header <code>&lt;experimental/memory_resource></code> synopsis</h1>
112112
bool operator!=(const polymorphic_allocator&lt;T1>& a,
113113
const polymorphic_allocator&lt;T2>& b) noexcept;
114114

115-
// The name resource_adaptor_imp is for exposition only.
116-
template &lt;class Allocator> class resource_adaptor_imp;
115+
// The name <var>resource_adaptor_imp</var> is for exposition only.
116+
template &lt;class Allocator> class <var>resource_adaptor_imp</var>;
117117

118118
template &lt;class Allocator>
119-
using resource_adaptor = resource_adaptor_imp&lt;
119+
using resource_adaptor = <var>resource_adaptor_imp</var>&lt;
120120
allocator_traits&lt;Allocator>::rebind_alloc&lt;char>>;
121121

122122
// Global memory resources
@@ -475,7 +475,7 @@ <h1><code>resource_adaptor</code></h1>
475475
In order that <code>resource_adaptor&lt;X&lt;T>></code> and <code>resource_adaptor&lt;X&lt;U>></code> are the same type for any allocator template <code>X</code> and types <code>T</code> and <code>U</code>,
476476
<code>resource_adaptor&lt;Allocator></code> is rendered as an alias to a class template such that <code>Allocator</code> is rebound to a <code>char</code> value type in every specialization of the class template.
477477
The requirements on this class template are defined below.
478-
The name <code>resource_adaptor_imp</code> is for exposition only and is not normative,
478+
The name <code><var>resource_adaptor_imp</var></code> is for exposition only and is not normative,
479479
but the definitions of the members of that class, whatever its name, are normative.
480480
In addition to the <code>Allocator</code> requirements (<cxx-ref in="cxx" to="allocator.requirements"></cxx-ref>), the parameter to <code>resource_adaptor</code> shall meet the following additional requirements:
481481
</p>
@@ -487,23 +487,23 @@ <h1><code>resource_adaptor</code></h1>
487487
</ul>
488488

489489
<pre><code>
490-
// The name resource_adaptor_imp is for exposition only.
490+
// The name <var>resource_adaptor_imp</var> is for exposition only.
491491
template &lt;class Allocator>
492-
class resource_adaptor_imp : public memory_resource {
492+
class <var>resource_adaptor_imp</var> : public memory_resource {
493493
// for exposition only
494494
Allocator m_alloc;
495495

496496
public:
497497
typedef Allocator allocator_type;
498498

499-
resource_adaptor_imp() = default;
500-
resource_adaptor_imp(const resource_adaptor_imp&) = default;
501-
resource_adaptor_imp(resource_adaptor_imp&&) = default;
499+
<var>resource_adaptor_imp</var>() = default;
500+
<var>resource_adaptor_imp</var>(const <var>resource_adaptor_imp</var>&) = default;
501+
<var>resource_adaptor_imp</var>(<var>resource_adaptor_imp</var>&&) = default;
502502

503-
explicit resource_adaptor_imp(const Allocator& a2);
504-
explicit resource_adaptor_imp(Allocator&& a2);
503+
explicit <var>resource_adaptor_imp</var>(const Allocator& a2);
504+
explicit <var>resource_adaptor_imp</var>(Allocator&& a2);
505505

506-
resource_adaptor_imp& operator=(const resource_adaptor_imp&) = default;
506+
<var>resource_adaptor_imp</var>& operator=(const <var>resource_adaptor_imp</var>&) = default;
507507

508508
allocator_type get_allocator() const { return m_alloc; }
509509

@@ -515,26 +515,26 @@ <h1><code>resource_adaptor</code></h1>
515515
};
516516

517517
template &lt;class Allocator>
518-
using resource_adaptor = typename resource_adaptor_imp&lt;
518+
using resource_adaptor = typename <var>resource_adaptor_imp</var>&lt;
519519
allocator_traits&lt;Allocator>::template rebind_alloc&lt;char>>;</code></pre>
520520
</cxx-section>
521521

522522
<cxx-section id="memory.resource.adaptor.ctor">
523-
<h1><code>resource_adaptor_imp</code> constructors</h1>
523+
<h1><code><var>resource_adaptor_imp</var></code> constructors</h1>
524524

525525
<cxx-function>
526-
<cxx-signature>explicit resource_adaptor_imp(const Allocator& a2);</cxx-signature>
526+
<cxx-signature>explicit <var>resource_adaptor_imp</var>(const Allocator& a2);</cxx-signature>
527527
<cxx-effects>Initializes <code>m_alloc</code> with <code>a2</code>.</cxx-effects>
528528
</cxx-function>
529529

530530
<cxx-function>
531-
<cxx-signature>explicit resource_adaptor_imp(Allocator&& a2);</cxx-signature>
531+
<cxx-signature>explicit <var>resource_adaptor_imp</var>(Allocator&& a2);</cxx-signature>
532532
<cxx-effects>Initializes <code>m_alloc</code> with <code>std::move(a2)</code>.</cxx-effects>
533533
</cxx-function>
534534
</cxx-section>
535535

536536
<cxx-section id="memory.resource.adaptor.mem">
537-
<h1><code>resource_adaptor_imp</code> member functions</h1>
537+
<h1><code><var>resource_adaptor_imp</var></code> member functions</h1>
538538

539539
<cxx-function>
540540
<cxx-signature>void* do_allocate(size_t bytes, size_t alignment);</cxx-signature>
@@ -549,7 +549,7 @@ <h1><code>resource_adaptor_imp</code> member functions</h1>
549549

550550
<cxx-function>
551551
<cxx-signature>bool do_is_equal(const memory_resource& other) const;</cxx-signature>
552-
<p>Let <code>p</code> be <code>dynamic_cast&lt;const resource_adaptor_imp*>(&other)</code>.</p>
552+
<p>Let <code>p</code> be <code>dynamic_cast&lt;const <var>resource_adaptor_imp</var>*>(&other)</code>.</p>
553553
<cxx-returns><code>false</code> if <code>p</code> is null, otherwise the value of <code>m_alloc == p->m_alloc</code>.</cxx-returns>
554554
</cxx-function>
555555
</cxx-section>

Diff for: tools/editing.el

+1
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@
1717
(surround-with-elem tagname begin end)))
1818
(global-set-key (kbd "C-, C-c") (bind-surround-with-elem "code"))
1919
(global-set-key (kbd "C-, C-i") (bind-surround-with-elem "i"))
20+
(global-set-key (kbd "C-, C-v") (bind-surround-with-elem "var"))

0 commit comments

Comments
 (0)