2193 Commits

Author SHA1 Message Date
Michael Witten
cb798c4f94 [P.6] copyedit: Move a comment for consistency, change "a" to "the", and fix a typo: "f" to "f2" (#2288)
Some checks failed
build / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
* [P.6] trivial: s/f/f2/ (#2288)

A comment in a code example was intended to refer to a function named "f2",
but the comment uses the name "f" instead, presumably because the code was
copied from the previous example; this commit fixes the typo.

* [P.6] trivial: Move a code comment (//...) to the line above the code (#2288)

This matches the way the previous, related code example is written,
a fact you can observe more readily by reviewing the patch of this
commit with larger context:

    git diff -U19

Specifically, the previous example looks like this:

    // bad: the number of elements is not passed to f()
    f(new int[n]);

* [P.6] trivial: s/a/the/ (#2288)

While "a wrong number can be passed" makes sense (and there are perhaps
good philosophical reasons to prefer it), I believe that the more natural
way to say it in common English is "the wrong number can be passed"; thus,
this commit changes "a" to "the" in the comment of a code example.

---------

Co-authored-by: Herb Sutter <herb.sutter@gmail.com>
2025-12-03 12:11:51 -08:00
Hong Xu
f33dd5127f C.183: Mention bit_cast as a C++20+ solution (#2293)
* C.183: Mention bit_cast as a C++20+ solution

* Remove last line

The change looks good, just removing the last line as it's more documentation than guidance

---------

Co-authored-by: Herb Sutter <herb.sutter@gmail.com>
2025-12-03 12:08:43 -08:00
Herb Sutter
f52da2b27e Resolves #2297 2025-12-03 12:06:20 -08:00
Ulrich Dorsch
a102f15e7a Fix T.65: retrieve copy_trait tag in code example (#2291)
For the tag dispatch to work it is vital to actually use copy_trait's tag.
2025-12-03 11:54:17 -08:00
Carson Radtke
4e1e155fc4 Proposed specification for gsl::dyn_array (#2261)
* final draft of proposal

* fix alloc formal

* resolve ambiguity and fix TODO

* some wording improvements

* apply some feedback after offline review w/ @GabrielDosReis

* Update specification after review from C++ Core Guidelines

- Make sure iterators and references cannot be invalidated by any
  operations (besides destruction).
- Update specification to annotate that some functions require certain
  language features (ranges and concepts).
- Remove dependence on "Container" named requirements because they
  require iterator-invalidating behavior.
- Explicitly add default and move constructors.
- Fix some typos

* Update dyn_array documentation reflecting editors' feedback

Clarified that `gsl::dyn_array` cannot be moved or copied. Updated the FAQ section to emphasize that it is a fixed-size array without iterator/pointer-invalidating operations.

* Update FAQ regarding gsl::dyn_array usage

Clarified the purpose of gsl::dyn_array in the FAQ section.

---------

Co-authored-by: Gabriel Dos Reis <GabrielDosReis@users.noreply.github.com>
2025-12-03 11:25:33 -08:00
Jonathan Wakely
851308a3d6 Fix sidebar anchors for recent changes (#2306)
Some checks failed
build / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
In ee52a86110 I made all the internal
anchors all-lowercase. This makes the links in the separate sidebar file
use the new anchors.
2025-11-23 18:22:31 -05:00
Jonathan Wakely
dcceef6096 Replace broken links to videos of Bjarne's talks
Some checks failed
build / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
Fixes #2302
2025-11-14 20:54:03 +00:00
Sergey Zubkov
f51cbb3aa1 [RF.core] fix link to slides from my 2017 talk
Some checks failed
build / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
2025-11-13 13:22:11 -05:00
Jonathan Wakely
3088cf4f1d Fix invalid regex in scripts/python/md-split.py (#2303)
The `[` character doesn't need to be escaped.

The `]` character needs to be escaped as `\\]` or as `\]` in a raw string.
2025-11-13 13:13:34 -05:00
Jonathan Wakely
ee52a86110 Change all explicitly created <a name="..."> anchors to lowercase (#2304)
GitHub Flavored Markdown requires these anchors to be all-lowercase for
markdown-style links within the document to work.

Also change one anchor that uses '*' which isn't valid in HTML or
Markdown.

And rename duplicate anchor res-macros to res-macros3.
2025-11-13 13:12:56 -05:00
Jonathan Wakely
0572c075fc Use https:// for all URLs where possible (#2301)
All the URLs changed here are to sites which do support HTTPS and which
automatically redirect the current links to the HTTPS version. Using
https:// directly avoids a redirection and a second request.

The only http:// URLs not fixed are broken and should be replaced in a
separate fix.
2025-11-13 13:10:54 -05:00
Sergey Zubkov
2a64d42398 Revert "Fixed a typo. local var name (#2284)"
Some checks failed
build / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
This reverts commit 2722375cee.

That typo was intentional as noted in the prose after the example (addmittedly hard to see)
2025-09-29 11:03:50 -04:00
Michael Witten
d40a490d48 [NR.6] trivial: s/goto_exit/goto exit/ (#2287)
Some checks failed
build / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
The example intended:

    goto exit;

However, it was mistakenly written as:

    goto_exit;
2025-09-28 23:04:51 -04:00
kalyanmysore
2722375cee Fixed a typo. local var name (#2284)
Some checks failed
build / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
Under P.6, there are a few examples where the size is passed separately. The local variable name for the size is n. There is a typo and m is passed instead. There is no local var named m. It should be n.
2025-09-18 22:14:08 -04:00
Sergey Zubkov
bf48712293 declutter isocpp.dic
Some checks failed
build / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
2025-07-27 09:54:11 -04:00
ivanpanch
b4c5037b40 Fix errata (#2280)
* Fix errata

* Update CppCoreGuidelines.md
2025-07-27 09:53:41 -04:00
Sergey Zubkov
ad93f8d0a6 [T.84] make List::front example compile
Some checks failed
build / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
closes #2231
2025-07-08 23:38:52 -04:00
Sergey Zubkov
cb0744e931 [C.183] make example compile
Some checks failed
build / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
closes #2271
2025-05-08 15:44:28 -04:00
Sergey Zubkov
a446e940a8 [C.128] reword the note on final classes
the issue was raised that it can be interpreted as a claim that final
and override are the same; this attempts to make it harder to misread

closes #2235
2025-05-08 15:19:20 -04:00
Sergey Zubkov
e76e1acaa8 bump date 2025-05-08 15:00:42 -04:00
Sergey Zubkov
eee70d8f2e fix CI 2025-05-08 14:28:42 -04:00
Niels Dekker
21d6761a84 Clarify NR.7 ("Don't make data members protected") (#2273)
Made NR.7 ("Don't make all data members `protected`") clearer by removing the word "all".

Used the default formulation of C.133 ("Avoid `protected` data") as hyperlink text, linking to C.133. Used the old hyperlink text ("Make member data `public` or (preferably) `private`") as alternative formulation of C.133.
2025-05-08 11:11:24 -07:00
Herb Sutter
177b50eced Add notes, closes #2266, closes #2267
Some checks failed
build / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
2025-04-15 11:02:42 -07:00
Shay Molcho
39097e3f85 Added missing periods for consistency and correctness (#2250)
Some checks are pending
build / build (push) Waiting to run
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Waiting to run
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Blocked by required conditions
Added missing periods in various parts of the text to ensure consistency and correctness in writing style. This revision maintains uniform formatting throughout the document, improves readability, and aligns the punctuation with the rest of the content for a more polished and structured appearance.
2025-04-15 10:32:02 -07:00
Xavier Bonaventura
e1bfeb2c8b Update AUTOSAR Guidelines link (#2262)
Mark AUTOSAR Guidelines as obsolete and link replacement rules.
This can be seen in the AUTOSAR document in the Scope clause.
2025-04-15 10:29:24 -07:00
bgloyer
9b3f20eb42 F.6 noexcept Issue #2220 (#2264)
* F.6 noexcept

* add overriders to isocpp.dic
2025-04-15 10:28:10 -07:00
Herb Sutter
0459ef444d Demote enforcement to note, closes #2246
Some checks failed
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
build / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
2025-01-16 17:10:12 -05:00
Sergii Slobodianiuk
f7d1181212 Fix P.11: Missing bug description. (#2245)
Some checks are pending
build / build (push) Waiting to run
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Waiting to run
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Blocked by required conditions
2025-01-16 11:08:50 -08:00
Gabriel Dos Reis
6864a9fc9e Clarify the status of dyn_array (#2243)
Some checks failed
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
build / build (push) Has been cancelled
2024-12-19 17:16:58 -05:00
Sergey Zubkov
8a59841030 update dict to clear CI 2024-12-19 17:13:31 -05:00
Herb Sutter
de1861cdbd Remove guidance against passing unique_ptr<T> by const&, closes #2240
Some checks are pending
build / build (push) Waiting to run
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Waiting to run
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Blocked by required conditions
2024-12-19 09:50:45 -10:00
Herb Sutter
e738bcc73c Remove "Capping" note, closes #2236 2024-12-19 09:49:16 -10:00
Herb Sutter
8557755adb Replace R.5 exception and examples with moving a BigObject to the heap to save stack
Some checks failed
build / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Has been cancelled
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Has been cancelled
Closes #2221
2024-10-24 11:51:04 -07:00
Herb Sutter
f3bc9dd1af Reword 3 occurrences of "special operations"
See #2224
2024-10-24 11:38:06 -07:00
Herb Sutter
5b98c70498 Fix R.21 warning to cover all Shared_pointer parameters
Closes #2226
2024-10-24 11:17:43 -07:00
arkadye
4e3a6f24bc Correct grammar for NR.2 (#2228) 2024-10-24 13:59:51 -04:00
Sergey Zubkov
48c3395fe1 C.20: another example touch-up to comply with C.46 2024-10-04 09:52:31 -04:00
Sergey Zubkov
417da7404d C.20: rephrase example, re #2212 2024-10-04 09:49:16 -04:00
Sergey Zubkov
0915e25942 update date 2024-10-03 16:40:01 -04:00
Sergey Zubkov
dd57964801 C.20: define a ctor to not imply we're forbidding all ctors
closes #2212
2024-10-03 16:36:32 -04:00
boyeong-jeon
50afe0234c E.16: Fix inconsistent description (#2209) 2024-07-02 09:19:37 -04:00
Sergey Zubkov
5ff92185f3 we should be able to publish the page from main branch 2024-05-11 22:29:27 -04:00
Sergey Zubkov
019ec5df95 update date 2024-05-11 22:09:50 -04:00
Sergey Zubkov
4d339c0b95 Create jekyll-gh-pages.yml 2024-05-11 22:06:29 -04:00
Herb Sutter
46c70fe2e5 Make exception safety new notes consistent, and mention that problem was fixed in C++17
Closes #2197
2024-05-09 12:44:11 -07:00
Herb Sutter
9656da8cb5 Add missing links
Closes #2196
2024-05-09 12:42:40 -07:00
Piotr Idzik
6435165ea0 Update link to MISRA C++ Guidelines (#2194)
* Update link to MISRA C++ 2008 Guidelines

* Link to MISRA C++ 2023 Guidelines
2024-05-09 10:03:56 -07:00
Herb Sutter
6c68bf8f34 Add note about pointerlike indirections, and remove incorrect destructor note
Closes #2183
Closes #2188
2024-04-14 14:34:20 -04:00
Herb Sutter
4f723b0fff Add "take a copy for immediate local use" case to F.16 (#2172)
Closes #2170
2024-04-11 10:24:34 -07:00
Paul Jansen
d76efeb645 Removed confusing comments (#2076) (#2179) 2024-04-11 10:14:02 -07:00