public inbox for gcc-cvs-wwwdocs@sourceware.org
help / color / mirror / Atom feed
From: Gerald Pfeifer <gerald@sourceware.org>
To: gcc-cvs-wwwdocs@gcc.gnu.org
Subject: gcc-wwwdocs branch master updated. 5a75fbda8c3c647b2ef659ffe67a031ee957abe6
Date: Fri,  3 Mar 2023 22:41:57 +0000 (GMT)	[thread overview]
Message-ID: <20230303224157.B49C63858D28@sourceware.org> (raw)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gcc-wwwdocs".

The branch, master has been updated
       via  5a75fbda8c3c647b2ef659ffe67a031ee957abe6 (commit)
      from  935fcdebfb2fb4dcd89edb51ebed5f1be0fb41e5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5a75fbda8c3c647b2ef659ffe67a031ee957abe6
Author: Gerald Pfeifer <gerald@pfeifer.com>
Date:   Fri Mar 3 23:41:36 2023 +0100

    gcc-13: Use <code> instead of <tt>

diff --git a/htdocs/gcc-13/porting_to.html b/htdocs/gcc-13/porting_to.html
index 953e1453..733bb254 100644
--- a/htdocs/gcc-13/porting_to.html
+++ b/htdocs/gcc-13/porting_to.html
@@ -150,8 +150,8 @@ previous behavior.
 GCC 13 now checks that allocators used with the standard library
 can be "rebound" to allocate memory for a different type,
 as required by the allocator requirements in the C++ standard.
-If an allocator type <tt>Alloc&lt;T&gt;</tt>
-cannot be correctly rebound to another type <tt>Alloc&lt;U&gt;</tt>,
+If an allocator type <code>Alloc&lt;T&gt;</code>
+cannot be correctly rebound to another type <code>Alloc&lt;U&gt;</code>,
 you will get an error like this:
 </p>
 
@@ -161,26 +161,27 @@ you will get an error like this:
 
 <p>
 The assertion checks that rebinding an allocator to its own value type is a
-no-op, which will be true if its <tt>rebind</tt> member is defined correctly.
+no-op, which will be true if its <code>rebind</code> member is defined correctly.
 If rebinding it to its own value type produces a different type,
 then the allocator cannot be used with the standard library.
 </p>
 
 <p>
-The most common cause of this error is an allocator type <tt>Alloc&lt;T&gt;</tt>
-that derives from <tt>std::allocator&lt;T&gt;</tt> but does not provide its own
-<tt>rebind</tt> member. When the standard library attempts to rebind the
-allocator using <tt>Alloc&lt;T&gt;::rebind&lt;U&gt;</tt> it finds the
-<tt>std::allocator&lt;T&gt;::rebind&lt;U&gt;</tt> member from the base class,
-and the result is <tt>std::allocator&lt;U&gt;</tt> instead of
-<tt>Alloc&lt;U&gt;</tt>.
+The most common cause of this error is an allocator type
+<code>Alloc&lt;T&gt;</code> that derives from
+<code>std::allocator&lt;T&gt;</code> but does not provide its own
+<code>rebind</code> member. When the standard library attempts to rebind the
+allocator using <code>Alloc&lt;T&gt;::rebind&lt;U&gt;</code> it finds the
+<code>std::allocator&lt;T&gt;::rebind&lt;U&gt;</code> member from the base
+class, and the result is <code>std::allocator&lt;U&gt;</code> instead of
+<code>Alloc&lt;U&gt;</code>.
 </p>
 
 <p>
-The solution is to provide a correct <tt>rebind</tt> member as shown below.
-A converting constructor must also be provided, so that that an
-<tt>Alloc&lt;U&gt;</tt> can be constructed from an <tt>Alloc&lt;T&gt;</tt>,
-and vice versa:
+The solution is to provide a correct <code>rebind</code> member as shown
+below.  A converting constructor must also be provided, so that that an
+<code>Alloc&lt;U&gt;</code> can be constructed from an
+<code>Alloc&lt;T&gt;</code>, and vice versa:
 </p>
 <pre><code>
 template&lt;class T&gt;
@@ -197,9 +198,10 @@ class Alloc
 </code></pre>
 
 <p>
-Since C++20, there is no <tt>rebind</tt> member in <tt>std::allocator</tt>,
-so deriving your own allocator types from <tt>std::allocator</tt> is simpler
-and doesn't require the derived allocator to provide its own <tt>rebind</tt>.
+Since C++20, there is no <code>rebind</code> member in
+<code>std::allocator</code>, so deriving your own allocator types from
+<code>std::allocator</code> is simpler and doesn't require the derived
+allocator to provide its own <code>rebind</code>.
 For compatibility with previous C++ standards, the member should still be
 provided. The converting constructor is still required even in C++20.
 </p>

-----------------------------------------------------------------------

Summary of changes:
 htdocs/gcc-13/porting_to.html | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
gcc-wwwdocs

                 reply	other threads:[~2023-03-03 22:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230303224157.B49C63858D28@sourceware.org \
    --to=gerald@sourceware.org \
    --cc=gcc-cvs-wwwdocs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).