<!doctype html><html lang="en">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  <title>P1389R0: Standing Document for SG20: Guidelines for Teaching C++ to Beginners</title>
<style data-fill-with="stylesheet">/******************************************************************************
 *                   Style sheet for the W3C specifications                   *
 *
 * Special classes handled by this style sheet include:
 *
 * Indices
 *   - .toc for the Table of Contents (<ol class="toc">)
 *     + <span class="secno"> for the section numbers
 *   - #toc for the Table of Contents (<nav id="toc">)
 *   - ul.index for Indices (<a href="#ref">term</a><span>, in §N.M</span>)
 *   - table.index for Index Tables (e.g. for properties or elements)
 *
 * Structural Markup
 *   - table.data for general data tables
 *     -> use 'scope' attribute, <colgroup>, <thead>, and <tbody> for best results !
 *     -> use <table class='complex data'> for extra-complex tables
 *     -> use <td class='long'> for paragraph-length cell content
 *     -> use <td class='pre'> when manual line breaks/indentation would help readability
 *   - dl.switch for switch statements
 *   - ol.algorithm for algorithms (helps to visualize nesting)
 *   - .figure and .caption (HTML4) and figure and figcaption (HTML5)
 *     -> .sidefigure for right-floated figures
 *   - ins/del
 *
 * Code
 *   - pre and code
 *
 * Special Sections
 *   - .note       for informative notes             (div, p, span, aside, details)
 *   - .example    for informative examples          (div, p, pre, span)
 *   - .issue      for issues                        (div, p, span)
 *   - .assertion  for assertions                    (div, p, span)
 *   - .advisement for loud normative statements     (div, p, strong)
 *   - .annoying-warning for spec obsoletion notices (div, aside, details)
 *
 * Definition Boxes
 *   - pre.def   for WebIDL definitions
 *   - table.def for tables that define other entities (e.g. CSS properties)
 *   - dl.def    for definition lists that define other entitles (e.g. HTML elements)
 *
 * Numbering
 *   - .secno for section numbers in .toc and headings (<span class='secno'>3.2</span>)
 *   - .marker for source-inserted example/figure/issue numbers (<span class='marker'>Issue 4</span>)
 *   - ::before styled for CSS-generated issue/example/figure numbers:
 *     -> Documents wishing to use this only need to add
 *        figcaption::before,
 *        .caption::before { content: "Figure "  counter(figure) " ";  }
 *        .example::before { content: "Example " counter(example) " "; }
 *        .issue::before   { content: "Issue "   counter(issue) " ";   }
 *
 * Header Stuff (ignore, just don't conflict with these classes)
 *   - .head for the header
 *   - .copyright for the copyright
 *
 * Miscellaneous
 *   - .overlarge for things that should be as wide as possible, even if
 *     that overflows the body text area. This can be used on an item or
 *     on its container, depending on the effect desired.
 *     Note that this styling basically doesn't help at all when printing,
 *     since A4 paper isn't much wider than the max-width here.
 *     It's better to design things to fit into a narrower measure if possible.
 *   - js-added ToC jump links (see fixup.js)
 *
 ******************************************************************************/

/******************************************************************************/
/*                                   Body                                     */
/******************************************************************************/

	body {
		counter-reset: example figure issue;

		/* Layout */
		max-width: 50em;               /* limit line length to 50em for readability   */
		margin: 0 auto;                /* center text within page                     */
		padding: 1.6em 1.5em 2em 50px; /* assume 16px font size for downlevel clients */
		padding: 1.6em 1.5em 2em calc(26px + 1.5em); /* leave space for status flag     */

		/* Typography */
		line-height: 1.5;
		font-family: sans-serif;
		widows: 2;
		orphans: 2;
		word-wrap: break-word;
		overflow-wrap: break-word;
		hyphens: auto;

		/* Colors */
		color: black;
		background: white top left fixed no-repeat;
		background-size: 25px auto;
	}


/******************************************************************************/
/*                         Front Matter & Navigation                          */
/******************************************************************************/

/** Header ********************************************************************/

	div.head { margin-bottom: 1em }
	div.head hr { border-style: solid; }

	div.head h1 {
		font-weight: bold;
		margin: 0 0 .1em;
		font-size: 220%;
	}

	div.head h2 { margin-bottom: 1.5em;}

/** W3C Logo ******************************************************************/

	.head .logo {
		float: right;
		margin: 0.4rem 0 0.2rem .4rem;
	}

	.head img[src*="logos/W3C"] {
		display: block;
		border: solid #1a5e9a;
		border-width: .65rem .7rem .6rem;
		border-radius: .4rem;
		background: #1a5e9a;
		color: white;
		font-weight: bold;
	}

	.head a:hover > img[src*="logos/W3C"],
	.head a:focus > img[src*="logos/W3C"] {
		opacity: .8;
	}

	.head a:active > img[src*="logos/W3C"] {
		background: #c00;
		border-color: #c00;
	}

	/* see also additional rules in Link Styling section */

/** Copyright *****************************************************************/

	p.copyright,
	p.copyright small { font-size: small }

/** Back to Top / ToC Toggle **************************************************/

	@media print {
		#toc-nav {
			display: none;
		}
	}
	@media not print {
		#toc-nav {
			position: fixed;
			z-index: 2;
			bottom: 0; left: 0;
			margin: 0;
			min-width: 1.33em;
			border-top-right-radius: 2rem;
			box-shadow: 0 0 2px;
			font-size: 1.5em;
			color: black;
		}
		#toc-nav > a {
			display: block;
			white-space: nowrap;

			height: 1.33em;
			padding: .1em 0.3em;
			margin: 0;

			background: white;
			box-shadow: 0 0 2px;
			border: none;
			border-top-right-radius: 1.33em;
			background: white;
		}
		#toc-nav > #toc-jump {
			padding-bottom: 2em;
			margin-bottom: -1.9em;
		}

		#toc-nav > a:hover,
		#toc-nav > a:focus {
			background: #f8f8f8;
		}
		#toc-nav > a:not(:hover):not(:focus) {
			color: #707070;
		}

		/* statusbar gets in the way on keyboard focus; remove once browsers fix */
		#toc-nav > a[href="#toc"]:not(:hover):focus:last-child {
			padding-bottom: 1.5rem;
		}

		#toc-nav:not(:hover) > a:not(:focus) > span + span {
			/* Ideally this uses :focus-within on #toc-nav */
			display: none;
		}
		#toc-nav > a > span + span {
			padding-right: 0.2em;
		}

		#toc-toggle-inline {
			vertical-align: 0.05em;
			font-size: 80%;
			color: gray;
			color: hsla(203,20%,40%,.7);
			border-style: none;
			background: transparent;
			position: relative;
		}
		#toc-toggle-inline:hover:not(:active),
		#toc-toggle-inline:focus:not(:active) {
			text-shadow: 1px 1px silver;
			top: -1px;
			left: -1px;
		}

		#toc-nav :active {
			color: #C00;
		}
	}

/** ToC Sidebar ***************************************************************/

	/* Floating sidebar */
	@media screen {
		body.toc-sidebar #toc {
			position: fixed;
			top: 0; bottom: 0;
			left: 0;
			width: 23.5em;
			max-width: 80%;
			max-width: calc(100% - 2em - 26px);
			overflow: auto;
			padding: 0 1em;
			padding-left: 42px;
			padding-left: calc(1em + 26px);
			background: inherit;
			background-color: #f7f8f9;
			z-index: 1;
			box-shadow: -.1em 0 .25em rgba(0,0,0,.1) inset;
		}
		body.toc-sidebar #toc h2 {
			margin-top: .8rem;
			font-variant: small-caps;
			font-variant: all-small-caps;
			text-transform: lowercase;
			font-weight: bold;
			color: gray;
			color: hsla(203,20%,40%,.7);
		}
		body.toc-sidebar #toc-jump:not(:focus) {
			width: 0;
			height: 0;
			padding: 0;
			position: absolute;
			overflow: hidden;
		}
	}
	/* Hide main scroller when only the ToC is visible anyway */
	@media screen and (max-width: 28em) {
		body.toc-sidebar {
			overflow: hidden;
		}
	}

	/* Sidebar with its own space */
	@media screen and (min-width: 78em) {
		body:not(.toc-inline) #toc {
			position: fixed;
			top: 0; bottom: 0;
			left: 0;
			width: 23.5em;
			overflow: auto;
			padding: 0 1em;
			padding-left: 42px;
			padding-left: calc(1em + 26px);
			background: inherit;
			background-color: #f7f8f9;
			z-index: 1;
			box-shadow: -.1em 0 .25em rgba(0,0,0,.1) inset;
		}
		body:not(.toc-inline) #toc h2 {
			margin-top: .8rem;
			font-variant: small-caps;
			font-variant: all-small-caps;
			text-transform: lowercase;
			font-weight: bold;
			color: gray;
			color: hsla(203,20%,40%,.7);
		}

		body:not(.toc-inline) {
			padding-left: 29em;
		}
		/* See also Overflow section at the bottom */

		body:not(.toc-inline) #toc-jump:not(:focus) {
			width: 0;
			height: 0;
			padding: 0;
			position: absolute;
			overflow: hidden;
		}
	}
	@media screen and (min-width: 90em) {
		body:not(.toc-inline) {
			margin: 0 4em;
		}
	}

/******************************************************************************/
/*                                Sectioning                                  */
/******************************************************************************/

/** Headings ******************************************************************/

	h1, h2, h3, h4, h5, h6, dt {
		page-break-after: avoid;
		page-break-inside: avoid;
		font: 100% sans-serif;   /* Reset all font styling to clear out UA styles */
		font-family: inherit;    /* Inherit the font family. */
		line-height: 1.2;        /* Keep wrapped headings compact */
		hyphens: manual;         /* Hyphenated headings look weird */
	}

	h2, h3, h4, h5, h6 {
		margin-top: 3rem;
	}

	h1, h2, h3 {
		color: #005A9C;
		background: transparent;
	}

	h1 { font-size: 170%; }
	h2 { font-size: 140%; }
	h3 { font-size: 120%; }
	h4 { font-weight: bold; }
	h5 { font-style: italic; }
	h6 { font-variant: small-caps; }
	dt { font-weight: bold; }

/** Subheadings ***************************************************************/

	h1 + h2,
	#subtitle {
		/* #subtitle is a subtitle in an H2 under the H1 */
		margin-top: 0;
	}
	h2 + h3,
	h3 + h4,
	h4 + h5,
	h5 + h6 {
		margin-top: 1.2em; /* = 1 x line-height */
	}

/** Section divider ***********************************************************/

	:not(.head) > hr {
		font-size: 1.5em;
		text-align: center;
		margin: 1em auto;
		height: auto;
		border: transparent solid 0;
		background: transparent;
	}
	:not(.head) > hr::before {
		content: "\2727\2003\2003\2727\2003\2003\2727";
	}

/******************************************************************************/
/*                            Paragraphs and Lists                            */
/******************************************************************************/

	p {
		margin: 1em 0;
	}

	dd > p:first-child,
	li > p:first-child {
		margin-top: 0;
	}

	ul, ol {
		margin-left: 0;
		padding-left: 2em;
	}

	li {
		margin: 0.25em 0 0.5em;
		padding: 0;
	}

	dl dd {
		margin: 0 0 .5em 2em;
	}

	.head dd + dd { /* compact for header */
		margin-top: -.5em;
	}

	/* Style for algorithms */
	ol.algorithm ol:not(.algorithm),
	.algorithm > ol ol:not(.algorithm) {
	 border-left: 0.5em solid #DEF;
	}

	/* Put nice boxes around each algorithm. */
	[data-algorithm]:not(.heading) {
	  padding: .5em;
	  border: thin solid #ddd; border-radius: .5em;
	  margin: .5em calc(-0.5em - 1px);
	}
	[data-algorithm]:not(.heading) > :first-child {
	  margin-top: 0;
	}
	[data-algorithm]:not(.heading) > :last-child {
	  margin-bottom: 0;
	}

	/* Style for switch/case <dl>s */
	dl.switch > dd > ol.only,
	dl.switch > dd > .only > ol {
	 margin-left: 0;
	}
	dl.switch > dd > ol.algorithm,
	dl.switch > dd > .algorithm > ol {
	 margin-left: -2em;
	}
	dl.switch {
	 padding-left: 2em;
	}
	dl.switch > dt {
	 text-indent: -1.5em;
	 margin-top: 1em;
	}
	dl.switch > dt + dt {
	 margin-top: 0;
	}
	dl.switch > dt::before {
	 content: '\21AA';
	 padding: 0 0.5em 0 0;
	 display: inline-block;
	 width: 1em;
	 text-align: right;
	 line-height: 0.5em;
	}

/** Terminology Markup ********************************************************/


/******************************************************************************/
/*                                 Inline Markup                              */
/******************************************************************************/

/** Terminology Markup ********************************************************/
	dfn   { /* Defining instance */
		font-weight: bolder;
	}
	a > i { /* Instance of term */
		font-style: normal;
	}
	dt dfn code, code.idl {
		font-size: medium;
	}
	dfn var {
		font-style: normal;
	}

/** Change Marking ************************************************************/

	del { color: red;  text-decoration: line-through; }
	ins { color: #080; text-decoration: underline;    }

/** Miscellaneous improvements to inline formatting ***************************/

	sup {
		vertical-align: super;
		font-size: 80%
	}

/******************************************************************************/
/*                                    Code                                    */
/******************************************************************************/

/** General monospace/pre rules ***********************************************/

	pre, code, samp {
		font-family: Menlo, Consolas, "DejaVu Sans Mono", Monaco, monospace;
		font-size: .9em;
		page-break-inside: avoid;
		hyphens: none;
		text-transform: none;
	}
	pre code,
	code code {
		font-size: 100%;
	}

	pre {
		margin-top: 1em;
		margin-bottom: 1em;
		overflow: auto;
	}

/** Inline Code fragments *****************************************************/

  /* Do something nice. */

/******************************************************************************/
/*                                    Links                                   */
/******************************************************************************/

/** General Hyperlinks ********************************************************/

	/* We hyperlink a lot, so make it less intrusive */
	a[href] {
		color: #034575;
		text-decoration: none;
		border-bottom: 1px solid #707070;
		/* Need a bit of extending for it to look okay */
		padding: 0 1px 0;
		margin: 0 -1px 0;
	}
	a:visited {
		border-bottom-color: #BBB;
	}

	/* Use distinguishing colors when user is interacting with the link */
	a[href]:focus,
	a[href]:hover {
		background: #f8f8f8;
		background: rgba(75%, 75%, 75%, .25);
		border-bottom-width: 3px;
		margin-bottom: -2px;
	}
	a[href]:active {
		color: #C00;
		border-color: #C00;
	}

	/* Backout above styling for W3C logo */
	.head .logo,
	.head .logo a {
		border: none;
		text-decoration: none;
		background: transparent;
	}

/******************************************************************************/
/*                                    Images                                  */
/******************************************************************************/

	img {
		border-style: none;
	}

	/* For autogen numbers, add
	   .caption::before, figcaption::before { content: "Figure " counter(figure) ". "; }
	*/

	figure, .figure, .sidefigure {
		page-break-inside: avoid;
		text-align: center;
		margin: 2.5em 0;
	}
	.figure img,    .sidefigure img,    figure img,
	.figure object, .sidefigure object, figure object {
		max-width: 100%;
		margin: auto;
	}
	.figure pre, .sidefigure pre, figure pre {
		text-align: left;
		display: table;
		margin: 1em auto;
	}
	.figure table, figure table {
		margin: auto;
	}
	@media screen and (min-width: 20em) {
		.sidefigure {
			float: right;
			width: 50%;
			margin: 0 0 0.5em 0.5em
		}
	}
	.caption, figcaption, caption {
		font-style: italic;
		font-size: 90%;
	}
	.caption::before, figcaption::before, figcaption > .marker {
		font-weight: bold;
	}
	.caption, figcaption {
		counter-increment: figure;
	}

	/* DL list is indented 2em, but figure inside it is not */
	dd > .figure, dd > figure { margin-left: -2em }

/******************************************************************************/
/*                             Colored Boxes                                  */
/******************************************************************************/

	.issue, .note, .example, .assertion, .advisement, blockquote {
		padding: .5em;
		border: .5em;
		border-left-style: solid;
		page-break-inside: avoid;
	}
	span.issue, span.note {
		padding: .1em .5em .15em;
		border-right-style: solid;
	}

	.issue,
	.note,
	.example,
	.advisement,
	.assertion,
	blockquote {
		margin: 1em auto;
	}
	.note  > p:first-child,
	.issue > p:first-child,
	blockquote > :first-child {
		margin-top: 0;
	}
	blockquote > :last-child {
		margin-bottom: 0;
	}

/** Blockquotes ***************************************************************/

	blockquote {
		border-color: silver;
	}

/** Open issue ****************************************************************/

	.issue {
		border-color: #E05252;
		background: #FBE9E9;
		counter-increment: issue;
		overflow: auto;
	}
	.issue::before, .issue > .marker {
		text-transform: uppercase;
		color: #AE1E1E;
		padding-right: 1em;
		text-transform: uppercase;
	}
	/* Add .issue::before { content: "Issue " counter(issue) " "; } for autogen numbers,
	   or use class="marker" to mark up the issue number in source. */

/** Example *******************************************************************/

	.example {
		border-color: #E0CB52;
		background: #FCFAEE;
		counter-increment: example;
		overflow: auto;
		clear: both;
	}
	.example::before, .example > .marker {
		text-transform: uppercase;
		color: #827017;
		min-width: 7.5em;
		display: block;
	}
	/* Add .example::before { content: "Example " counter(example) " "; } for autogen numbers,
	   or use class="marker" to mark up the example number in source. */

/** Non-normative Note ********************************************************/

	.note {
		border-color: #52E052;
		background: #E9FBE9;
		overflow: auto;
	}

	.note::before, .note > .marker,
	details.note > summary::before,
	details.note > summary > .marker {
		text-transform: uppercase;
		display: block;
		color: hsl(120, 70%, 30%);
	}
	/* Add .note::before { content: "Note"; } for autogen label,
	   or use class="marker" to mark up the label in source. */

	details.note > summary {
		display: block;
		color: hsl(120, 70%, 30%);
	}
	details.note[open] > summary {
		border-bottom: 1px silver solid;
	}

/** Assertion Box *************************************************************/
	/*  for assertions in algorithms */

	.assertion {
		border-color: #AAA;
		background: #EEE;
	}

/** Advisement Box ************************************************************/
	/*  for attention-grabbing normative statements */

	.advisement {
		border-color: orange;
		border-style: none solid;
		background: #FFEECC;
	}
	strong.advisement {
		display: block;
		text-align: center;
	}
	.advisement > .marker {
		color: #B35F00;
	}

/** Spec Obsoletion Notice ****************************************************/
	/* obnoxious obsoletion notice for older/abandoned specs. */

	details {
		display: block;
	}
	summary {
		font-weight: bolder;
	}

	.annoying-warning:not(details),
	details.annoying-warning:not([open]) > summary,
	details.annoying-warning[open] {
		background: #fdd;
		color: red;
		font-weight: bold;
		padding: .75em 1em;
		border: thick red;
		border-style: solid;
		border-radius: 1em;
	}
	.annoying-warning :last-child {
		margin-bottom: 0;
	}

@media not print {
	details.annoying-warning[open] {
		position: fixed;
		left: 1em;
		right: 1em;
		bottom: 1em;
		z-index: 1000;
	}
}

	details.annoying-warning:not([open]) > summary {
		text-align: center;
	}

/** Entity Definition Boxes ***************************************************/

	.def {
		padding: .5em 1em;
		background: #DEF;
		margin: 1.2em 0;
		border-left: 0.5em solid #8CCBF2;
	}

/******************************************************************************/
/*                                    Tables                                  */
/******************************************************************************/

	th, td {
		text-align: left;
		text-align: start;
	}

/** Property/Descriptor Definition Tables *************************************/

	table.def {
		/* inherits .def box styling, see above */
		width: 100%;
		border-spacing: 0;
	}

	table.def td,
	table.def th {
		padding: 0.5em;
		vertical-align: baseline;
		border-bottom: 1px solid #bbd7e9;
	}

	table.def > tbody > tr:last-child th,
	table.def > tbody > tr:last-child td {
		border-bottom: 0;
	}

	table.def th {
		font-style: italic;
		font-weight: normal;
		padding-left: 1em;
		width: 3em;
	}

	/* For when values are extra-complex and need formatting for readability */
	table td.pre {
		white-space: pre-wrap;
	}

	/* A footnote at the bottom of a def table */
	table.def           td.footnote {
		padding-top: 0.6em;
	}
	table.def           td.footnote::before {
		content: " ";
		display: block;
		height: 0.6em;
		width: 4em;
		border-top: thin solid;
	}

/** Data tables (and properly marked-up index tables) *************************/
	/*
		 <table class="data"> highlights structural relationships in a table
		 when correct markup is used (e.g. thead/tbody, th vs. td, scope attribute)

		 Use class="complex data" for particularly complicated tables --
		 (This will draw more lines: busier, but clearer.)

		 Use class="long" on table cells with paragraph-like contents
		 (This will adjust text alignment accordingly.)
		 Alternately use class="longlastcol" on tables, to have the last column assume "long".
	*/

	table {
		word-wrap: normal;
		overflow-wrap: normal;
		hyphens: manual;
	}

	table.data,
	table.index {
		margin: 1em auto;
		border-collapse: collapse;
		border: hidden;
		width: 100%;
	}
	table.data caption,
	table.index caption {
		max-width: 50em;
		margin: 0 auto 1em;
	}

	table.data td,  table.data th,
	table.index td, table.index th {
		padding: 0.5em 1em;
		border-width: 1px;
		border-color: silver;
		border-top-style: solid;
	}

	table.data thead td:empty {
		padding: 0;
		border: 0;
	}

	table.data  thead,
	table.index thead,
	table.data  tbody,
	table.index tbody {
		border-bottom: 2px solid;
	}

	table.data colgroup,
	table.index colgroup {
		border-left: 2px solid;
	}

	table.data  tbody th:first-child,
	table.index tbody th:first-child  {
		border-right: 2px solid;
		border-top: 1px solid silver;
		padding-right: 1em;
	}

	table.data th[colspan],
	table.data td[colspan] {
		text-align: center;
	}

	table.complex.data th,
	table.complex.data td {
		border: 1px solid silver;
		text-align: center;
	}

	table.data.longlastcol td:last-child,
	table.data td.long {
	 vertical-align: baseline;
	 text-align: left;
	}

	table.data img {
		vertical-align: middle;
	}


/*
Alternate table alignment rules

	table.data,
	table.index {
		text-align: center;
	}

	table.data  thead th[scope="row"],
	table.index thead th[scope="row"] {
		text-align: right;
	}

	table.data  tbody th:first-child,
	table.index tbody th:first-child  {
		text-align: right;
	}

Possible extra rowspan handling

	table.data  tbody th[rowspan]:not([rowspan='1']),
	table.index tbody th[rowspan]:not([rowspan='1']),
	table.data  tbody td[rowspan]:not([rowspan='1']),
	table.index tbody td[rowspan]:not([rowspan='1']) {
		border-left: 1px solid silver;
	}

	table.data  tbody th[rowspan]:first-child,
	table.index tbody th[rowspan]:first-child,
	table.data  tbody td[rowspan]:first-child,
	table.index tbody td[rowspan]:first-child{
		border-left: 0;
		border-right: 1px solid silver;
	}
*/

/******************************************************************************/
/*                                  Indices                                   */
/******************************************************************************/


/** Table of Contents *********************************************************/

	.toc a {
		/* More spacing; use padding to make it part of the click target. */
		padding-top: 0.1rem;
		/* Larger, more consistently-sized click target */
		display: block;
		/* Reverse color scheme */
		color: black;
		border-color: #3980B5;
		border-bottom-width: 3px !important;
		margin-bottom: 0px !important;
	}
	.toc a:visited {
		border-color: #054572;
	}
	.toc a:not(:focus):not(:hover) {
		/* Allow colors to cascade through from link styling */
		border-bottom-color: transparent;
	}

	.toc, .toc ol, .toc ul, .toc li {
		list-style: none; /* Numbers must be inlined into source */
		/* because generated content isn't search/selectable and markers can't do multilevel yet */
		margin:  0;
		padding: 0;
		line-height: 1.1rem; /* consistent spacing */
	}

	/* ToC not indented until third level, but font style & margins show hierarchy */
	.toc > li             { font-weight: bold;   }
	.toc > li li          { font-weight: normal; }
	.toc > li li li       { font-size:   95%;    }
	.toc > li li li li    { font-size:   90%;    }
	.toc > li li li li .secno { font-size: 85%; }
	.toc > li li li li li { font-size:   85%;    }
	.toc > li li li li li .secno { font-size: 100%; }

	/* @supports not (display:grid) { */
		.toc > li             { margin: 1.5rem 0;    }
		.toc > li li          { margin: 0.3rem 0;    }
		.toc > li li li       { margin-left: 2rem;   }

		/* Section numbers in a column of their own */
		.toc .secno {
			float: left;
			width: 4rem;
			white-space: nowrap;
		}

		.toc li {
			clear: both;
		}

		:not(li) > .toc              { margin-left:  5rem; }
		.toc .secno                  { margin-left: -5rem; }
		.toc > li li li .secno       { margin-left: -7rem; }
		.toc > li li li li .secno    { margin-left: -9rem; }
		.toc > li li li li li .secno { margin-left: -11rem; }

		/* Tighten up indentation in narrow ToCs */
		@media (max-width: 30em) {
			:not(li) > .toc              { margin-left:  4rem; }
			.toc .secno                  { margin-left: -4rem; }
			.toc > li li li              { margin-left:  1rem; }
			.toc > li li li .secno       { margin-left: -5rem; }
			.toc > li li li li .secno    { margin-left: -6rem; }
			.toc > li li li li li .secno { margin-left: -7rem; }
		}
	/* } */

	@supports (display:grid) {
		/* Use #toc over .toc to override non-@supports rules. */
		#toc {
			display: grid;
			align-content: start;
			grid-template-columns: auto 1fr;
			grid-column-gap: 1rem;
			column-gap: 1rem;
			grid-row-gap: .6rem;
			row-gap: .6rem;
		}
		#toc h2 {
			grid-column: 1 / -1;
			margin-bottom: 0;
		}
		#toc ol,
		#toc li,
		#toc a {
			display: contents;
			/* Switch <a> to subgrid when supported */
		}
		#toc span {
			margin: 0;
		}
		#toc > .toc > li > a > span {
			/* The spans of the top-level list,
			   comprising the first items of each top-level section. */
			margin-top: 1.1rem;
		}
		#toc#toc .secno { /* Ugh, need more specificity to override base.css */
			grid-column: 1;
			width: auto;
			margin-left: 0;
		}
		#toc .content {
			grid-column: 2;
			width: auto;
			margin-right: 1rem;
		}
		#toc .content:hover {
			background: rgba(75%, 75%, 75%, .25);
			border-bottom: 3px solid #054572;
			margin-bottom: -3px;
		}
		#toc li li li .content {
			margin-left: 1rem;
		}
		#toc li li li li .content {
			margin-left: 2rem;
		}
	}


/** Index *********************************************************************/

	/* Index Lists: Layout */
	ul.index       { margin-left: 0; columns: 15em; text-indent: 1em hanging; }
	ul.index li    { margin-left: 0; list-style: none; break-inside: avoid; }
	ul.index li li { margin-left: 1em }
	ul.index dl    { margin-top: 0; }
	ul.index dt    { margin: .2em 0 .2em 20px;}
	ul.index dd    { margin: .2em 0 .2em 40px;}
	/* Index Lists: Typography */
	ul.index ul,
	ul.index dl { font-size: smaller; }
	@media not print {
		ul.index li span {
			white-space: nowrap;
			color: transparent; }
		ul.index li a:hover + span,
		ul.index li a:focus + span {
			color: #707070;
		}
	}

/** Index Tables *****************************************************/
	/* See also the data table styling section, which this effectively subclasses */

	table.index {
		font-size: small;
		border-collapse: collapse;
		border-spacing: 0;
		text-align: left;
		margin: 1em 0;
	}

	table.index td,
	table.index th {
		padding: 0.4em;
	}

	table.index tr:hover td:not([rowspan]),
	table.index tr:hover th:not([rowspan]) {
		background: #f7f8f9;
	}

	/* The link in the first column in the property table (formerly a TD) */
	table.index th:first-child a {
		font-weight: bold;
	}

/******************************************************************************/
/*                                    Print                                   */
/******************************************************************************/

	@media print {
		/* Pages have their own margins. */
		html {
			margin: 0;
		}
		/* Serif for print. */
		body {
			font-family: serif;
		}
	}
	@page {
		margin: 1.5cm 1.1cm;
	}

/******************************************************************************/
/*                                    Legacy                                  */
/******************************************************************************/

	/* This rule is inherited from past style sheets. No idea what it's for. */
	.hide { display: none }



/******************************************************************************/
/*                             Overflow Control                               */
/******************************************************************************/

	.figure .caption, .sidefigure .caption, figcaption {
		/* in case figure is overlarge, limit caption to 50em */
		max-width: 50rem;
		margin-left: auto;
		margin-right: auto;
	}
	.overlarge > table {
		/* limit preferred width of table */
		max-width: 50em;
		margin-left: auto;
		margin-right: auto;
	}

	@media (min-width: 55em) {
		.overlarge {
			margin-left: calc(13px + 26.5rem - 50vw);
			margin-right: calc(13px + 26.5rem - 50vw);
			max-width: none;
		}
	}
	@media screen and (min-width: 78em) {
		body:not(.toc-inline) .overlarge {
			/* 30.5em body padding 50em content area */
			margin-left: calc(40em - 50vw) !important;
			margin-right: calc(40em - 50vw) !important;
		}
	}
	@media screen and (min-width: 90em) {
		body:not(.toc-inline) .overlarge {
			/* 4em html margin 30.5em body padding 50em content area */
			margin-left: 0 !important;
			margin-right: calc(84.5em - 100vw) !important;
		}
	}

	@media not print {
		.overlarge {
			overflow-x: auto;
			/* See Lea Verou's explanation background-attachment:
			 * http://lea.verou.me/2012/04/background-attachment-local/
			 *
			background: top left  / 4em 100% linear-gradient(to right,  #ffffff, rgba(255, 255, 255, 0)) local,
			            top right / 4em 100% linear-gradient(to left, #ffffff, rgba(255, 255, 255, 0)) local,
			            top left  / 1em 100% linear-gradient(to right,  #c3c3c5, rgba(195, 195, 197, 0)) scroll,
			            top right / 1em 100% linear-gradient(to left, #c3c3c5, rgba(195, 195, 197, 0)) scroll,
			            white;
			background-repeat: no-repeat;
			*/
		}
	}
</style>
<style type="text/css">
    table, th, td {
      border: 1px solid black;
      border-collapse: collapse;
      vertical-align: top;
    }
    th, td {
      border-left: none;
      border-right: none;
      padding: 0px 10px;
    }
    th {
      text-align: center;
    }
  </style>
  <meta content="Bikeshed version 6dcb46ba8cae3704b42c05bcd8578c92d239786a" name="generator">
  <link href="https://wg21.link/p1389" rel="canonical">
  <link href="https://isocpp.org/favicon.ico" rel="icon">
  <meta content="d620f8efb04ce8c9f5812a10b213884c01bcd62c" name="document-revision">
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
   regarding paragraph and lists. */
[data-md] > :first-child {
    margin-top: 0;
}
[data-md] > :last-child {
    margin-bottom: 0;
}</style>
<style>/* style-counters */

body {
    counter-reset: example figure issue;
}
.issue {
    counter-increment: issue;
}
.issue:not(.no-marker)::before {
    content: "Issue " counter(issue);
}

.example {
    counter-increment: example;
}
.example:not(.no-marker)::before {
    content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
    content: "Invalid Example" counter(example);
}

figcaption {
    counter-increment: figure;
}
figcaption:not(.no-marker)::before {
    content: "Figure " counter(figure) " ";
}</style>
<style>/* style-syntax-highlighting */

.highlight:not(.idl) { background: hsl(24, 20%, 95%); }
code.highlight { padding: .1em; border-radius: .3em; }
pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; }
c-[a] { color: #990055 } /* Keyword.Declaration */
c-[b] { color: #990055 } /* Keyword.Type */
c-[c] { color: #708090 } /* Comment */
c-[d] { color: #708090 } /* Comment.Multiline */
c-[e] { color: #0077aa } /* Name.Attribute */
c-[f] { color: #669900 } /* Name.Tag */
c-[g] { color: #222222 } /* Name.Variable */
c-[k] { color: #990055 } /* Keyword */
c-[l] { color: #000000 } /* Literal */
c-[m] { color: #000000 } /* Literal.Number */
c-[n] { color: #0077aa } /* Name */
c-[o] { color: #999999 } /* Operator */
c-[p] { color: #999999 } /* Punctuation */
c-[s] { color: #a67f59 } /* Literal.String */
c-[t] { color: #a67f59 } /* Literal.String.Single */
c-[u] { color: #a67f59 } /* Literal.String.Double */
c-[cp] { color: #708090 } /* Comment.Preproc */
c-[c1] { color: #708090 } /* Comment.Single */
c-[cs] { color: #708090 } /* Comment.Special */
c-[kc] { color: #990055 } /* Keyword.Constant */
c-[kn] { color: #990055 } /* Keyword.Namespace */
c-[kp] { color: #990055 } /* Keyword.Pseudo */
c-[kr] { color: #990055 } /* Keyword.Reserved */
c-[ld] { color: #000000 } /* Literal.Date */
c-[nc] { color: #0077aa } /* Name.Class */
c-[no] { color: #0077aa } /* Name.Constant */
c-[nd] { color: #0077aa } /* Name.Decorator */
c-[ni] { color: #0077aa } /* Name.Entity */
c-[ne] { color: #0077aa } /* Name.Exception */
c-[nf] { color: #0077aa } /* Name.Function */
c-[nl] { color: #0077aa } /* Name.Label */
c-[nn] { color: #0077aa } /* Name.Namespace */
c-[py] { color: #0077aa } /* Name.Property */
c-[ow] { color: #999999 } /* Operator.Word */
c-[mb] { color: #000000 } /* Literal.Number.Bin */
c-[mf] { color: #000000 } /* Literal.Number.Float */
c-[mh] { color: #000000 } /* Literal.Number.Hex */
c-[mi] { color: #000000 } /* Literal.Number.Integer */
c-[mo] { color: #000000 } /* Literal.Number.Oct */
c-[sb] { color: #a67f59 } /* Literal.String.Backtick */
c-[sc] { color: #a67f59 } /* Literal.String.Char */
c-[sd] { color: #a67f59 } /* Literal.String.Doc */
c-[se] { color: #a67f59 } /* Literal.String.Escape */
c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */
c-[si] { color: #a67f59 } /* Literal.String.Interpol */
c-[sx] { color: #a67f59 } /* Literal.String.Other */
c-[sr] { color: #a67f59 } /* Literal.String.Regex */
c-[ss] { color: #a67f59 } /* Literal.String.Symbol */
c-[vc] { color: #0077aa } /* Name.Variable.Class */
c-[vg] { color: #0077aa } /* Name.Variable.Global */
c-[vi] { color: #0077aa } /* Name.Variable.Instance */
c-[il] { color: #000000 } /* Literal.Number.Integer.Long */
</style>
<style>/* style-selflinks */

.heading, .issue, .note, .example, li, dt {
    position: relative;
}
a.self-link {
    position: absolute;
    top: 0;
    left: calc(-1 * (3.5rem - 26px));
    width: calc(3.5rem - 26px);
    height: 2em;
    text-align: center;
    border: none;
    transition: opacity .2s;
    opacity: .5;
}
a.self-link:hover {
    opacity: 1;
}
.heading > a.self-link {
    font-size: 83%;
}
li > a.self-link {
    left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
    top: auto;
    left: auto;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    background: gray;
    color: white;
    font-style: normal;
    transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
    opacity: 1;
}
dfn > a.self-link:hover {
    color: black;
}

a.self-link::before            { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before      { content: "#"; }</style>
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
    color: #005a9c;
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */
    white-space: nowrap;
}
.type { /* CSS value <type> */
    font-style: italic;
}
pre .property::before, pre .property::after {
    content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
    content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
    content: "’";
}

[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
    content: "";
}

[data-link-type=element],
[data-link-type=element-attr] {
    font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after  { content: ">" }

[data-link-type=biblio] {
    white-space: pre;
}</style>
 <body class="h-entry">
  <div class="head">
   <p data-fill-with="logo"></p>
   <h1 class="p-name no-ref" id="title">P1389R0<br>Standing Document for SG20: Guidelines for Teaching C++ to Beginners</h1>
   <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Draft Proposal, <time class="dt-updated" datetime="2019-01-21">2019-01-21</time></span></h2>
   <div data-fill-with="spec-metadata">
    <dl>
     <dt>This version:
     <dd><a class="u-url" href="https://wg21.link/p1389">https://wg21.link/p1389</a>
     <dt>Authors:
     <dd>
      <dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:cjdb.ns@gmail.com">Christopher Di Bella</a>
     <dd>
      <dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:simon.brand@microsoft.com">Simon Brand</a>
     <dd>
      <dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:mdadams@ece.uvic.ca">Michael Adams</a>
     <dt>Audience:
     <dd>SG20
     <dt>Project:
     <dd>ISO/IEC JTC1/SC22/WG21 14882: Programming Language — C++
    </dl>
   </div>
   <div data-fill-with="warning"></div>
   <hr title="Separator for header">
  </div>
  <div class="p-summary" data-fill-with="abstract">
   <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
   <p>P1389 proposes that SG20 create a Standing Document for guidelines for teaching introductory C++, and a handful of proposed initial guidelines.</p>
  </div>
  <nav data-fill-with="table-of-contents" id="toc">
   <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
   <ol class="toc" role="directory">
    <li>
     <a href="#motivation-for-a-set-of-teaching-guidelines-for-beginners"><span class="secno">1</span> <span class="content">Motivation for a set of Teaching Guidelines for Beginners</span></a>
     <ol class="toc">
      <li><a href="#who-is-a-beginner"><span class="secno">1.1</span> <span class="content">Who is a <span class="property">beginner</span>?</span></a>
      <li><a href="#why-beginner-guidelines"><span class="secno">1.2</span> <span class="content">Why beginner guidelines?</span></a>
     </ol>
    <li>
     <a href="#guidelines"><span class="secno">2</span> <span class="content">Guidelines</span></a>
     <ol class="toc">
      <li>
       <a href="#what-are-beginner-topics"><span class="secno">2.1</span> <span class="content">What are beginner topics?</span></a>
       <ol class="toc">
        <li><a href="#stage-1-fundamentals"><span class="secno">2.1.1</span> <span class="content">Stage 1 (fundamentals)</span></a>
        <li><a href="#stage-2-todo-name-me"><span class="secno">2.1.2</span> <span class="content">Stage 2 (todo: name me)</span></a>
        <li><a href="#stage-3-todo-name-me"><span class="secno">2.1.3</span> <span class="content">Stage 3 (todo: name me)</span></a>
        <li><a href="#stage-4-todo-name-me"><span class="secno">2.1.4</span> <span class="content">Stage 4 (todo: name me)</span></a>
       </ol>
      <li>
       <a href="#types-types"><span class="secno">2.2</span> <span class="content">[types] Types</span></a>
       <ol class="toc">
        <li>
         <a href="#typesbasic-basic-types"><span class="secno">2.2.1</span> <span class="content">[types.basic] Basic types</span></a>
         <ol class="toc">
          <li><a href="#typesbasicprimary-primary-types"><span class="secno">2.2.1.1</span> <span class="content">[types.basic.primary] Primary types</span></a>
          <li><a href="#typesbasicconversions-conversions"><span class="secno">2.2.1.2</span> <span class="content">[types.basic.conversions] Conversions</span></a>
         </ol>
        <li>
         <a href="#typesconst-constness"><span class="secno">2.2.2</span> <span class="content">[types.const] Constness</span></a>
         <ol class="toc">
          <li><a href="#typesconstconstexpr-encourage-constexpr-values-whenever-it-is-possible"><span class="secno">2.2.2.1</span> <span class="content">[types.const.constexpr] Encourage <code class="highlight"><c- k>constexpr</c-></code> values whenever it is possible</span></a>
          <li><a href="#typesconstconst-encourage-const-whenever-you-cant-use-constexpr"><span class="secno">2.2.2.2</span> <span class="content">[types.const.const] Encourage <code class="highlight"><c- k>const</c-></code> whenever you can’t use <code class="highlight"><c- k>constexpr</c-></code></span></a>
          <li><a href="#typesconstmutable-dont-pan-mutable"><span class="secno">2.2.2.3</span> <span class="content">[types.const.mutable] Don’t pan <code class="highlight"><c- k>mutable</c-></code></span></a>
         </ol>
        <li><a href="#typesmonadic-types-with-monadic-interfaces"><span class="secno">2.2.3</span> <span class="content">[types.monadic] Types with monadic interfaces</span></a>
       </ol>
      <li>
       <a href="#delay-delay-features-until-there-is-a-genuine-use-case"><span class="secno">2.3</span> <span class="content">[delay] Delay features until there is a genuine use-case</span></a>
       <ol class="toc">
        <li><a href="#delayreferences-references"><span class="secno">2.3.1</span> <span class="content">[delay.references] References</span></a>
        <li><a href="#delaypointers-pointers"><span class="secno">2.3.2</span> <span class="content">[delay.pointers] Pointers</span></a>
        <li><a href="#delayiterators-iterators"><span class="secno">2.3.3</span> <span class="content">[delay.iterators] Iterators</span></a>
        <li><a href="#delayconceptdefinitions-concept-definitions"><span class="secno">2.3.4</span> <span class="content">[delay.concept.definitions] Concept definitions</span></a>
        <li><a href="#delaycpp-c-preprocessor"><span class="secno">2.3.5</span> <span class="content">[delay.cpp] C Preprocessor</span></a>
       </ol>
      <li>
       <a href="#style-style-practices"><span class="secno">2.4</span> <span class="content">[style] Style practices</span></a>
       <ol class="toc">
        <li><a href="#styleguide-use-a-style-guide"><span class="secno">2.4.1</span> <span class="content">[style.guide] Use a style guide</span></a>
        <li><a href="#stylenaming-use-consistent-set-of-naming-conventions-for-identifiers"><span class="secno">2.4.2</span> <span class="content">[style.naming] Use consistent set of naming conventions for identifiers</span></a>
        <li><a href="#styleall_caps-avoid-all_caps-names"><span class="secno">2.4.3</span> <span class="content">[style.<code class="highlight"><c- n>ALL_CAPS</c-></code>] Avoid <code class="highlight"><c- n>ALL_CAPS</c-></code> names</span></a>
       </ol>
      <li><a href="#projects-projects"><span class="secno">2.5</span> <span class="content">[projects] Projects</span></a>
      <li>
       <a href="#tools-tools"><span class="secno">2.6</span> <span class="content">[tools] Tools</span></a>
       <ol class="toc">
        <li>
         <a href="#toolscompilers-use-an-up-to-date-compiler"><span class="secno">2.6.1</span> <span class="content">[tools.compilers] Use an up-to-date compiler</span></a>
         <ol class="toc">
          <li><a href="#toolsmultiplecompilers-use-two-or-more-competing-compilers"><span class="secno">2.6.1.1</span> <span class="content">[tools.multiple.compilers] Use two or more competing compilers</span></a>
         </ol>
        <li><a href="#toolscompilerwarnings-use-a-high-level-of-warnings-and-enable-warnings-as-error-mode"><span class="secno">2.6.2</span> <span class="content">[tools.compiler.warnings] Use a high level of warnings and enable 'warnings as error' mode</span></a>
        <li><a href="#toolstesting-introduce-a-testing-framework"><span class="secno">2.6.3</span> <span class="content">[tools.testing] Introduce a testing framework</span></a>
        <li><a href="#toolsdebugger-introduce-a-debugger-early"><span class="secno">2.6.4</span> <span class="content">[tools.debugger] Introduce a debugger early</span></a>
        <li><a href="#toolspackagemanagement-use-a-package-manager"><span class="secno">2.6.5</span> <span class="content">[tools.package.management] Use a package manager</span></a>
        <li><a href="#toolsbuildsystem-use-a-build-system"><span class="secno">2.6.6</span> <span class="content">[tools.build.system] Use a build system</span></a>
        <li><a href="#toolsonlinecompiler-introduce-online-compilers"><span class="secno">2.6.7</span> <span class="content">[tools.online.compiler] Introduce online compilers</span></a>
        <li><a href="#toolscodeformatter-use-a-code-formatter"><span class="secno">2.6.8</span> <span class="content">[tools.code.formatter] Use a code formatter</span></a>
        <li><a href="#toolslinter-use-linters"><span class="secno">2.6.9</span> <span class="content">[tools.linter] Use linters</span></a>
        <li><a href="#toolsruntimeanalysis-use-run-time-analysers-especially-when-teaching-free-store"><span class="secno">2.6.10</span> <span class="content">[tools.runtime.analysis] Use run-time analysers, especially when teaching free store</span></a>
       </ol>
      <li>
       <a href="#appreciation-appreciation-for-c"><span class="secno">2.7</span> <span class="content">[appreciation] Appreciation for C++</span></a>
       <ol class="toc">
        <li><a href="#appreciationhistory-history"><span class="secno">2.7.1</span> <span class="content">[appreciation.history] History</span></a>
        <li><a href="#appreciationirl-c-in-the-real-world"><span class="secno">2.7.2</span> <span class="content">[appreciation.irl] C++ in the Real World</span></a>
       </ol>
      <li>
       <a href="#meta-meta-guidelines"><span class="secno">2.8</span> <span class="content">[meta] Meta-guidelines</span></a>
       <ol class="toc">
        <li><a href="#metarevision-regularly-revise-the-curriculum"><span class="secno">2.8.1</span> <span class="content">[meta.revision] Regularly revise the curriculum</span></a>
       </ol>
     </ol>
    <li>
     <a href="#student-outcomes"><span class="secno">3</span> <span class="content">Student outcomes</span></a>
     <ol class="toc">
      <li><a href="#containers"><span class="secno">3.1</span> <span class="content">Containers</span></a>
      <li><a href="#algorithms-and-ranges"><span class="secno">3.2</span> <span class="content">Algorithms and ranges</span></a>
      <li><a href="#error-handling"><span class="secno">3.3</span> <span class="content">Error handling</span></a>
      <li><a href="#testing"><span class="secno">3.4</span> <span class="content">Testing</span></a>
      <li><a href="#tool-outcomes"><span class="secno">3.5</span> <span class="content">Tool outcomes</span></a>
     </ol>
    <li><a href="#acknowledgements"><span class="secno">4</span> <span class="content">Acknowledgements</span></a>
    <li>
     <a href="#appendix-a-resources-for-students"><span class="secno"></span> <span class="content">Appendix A: Resources for Students</span></a>
     <ol class="toc">
      <li><a href="#programming----principles-and-practice-using-c"><span class="secno"></span> <span class="content">Programming -- Principles and Practice Using C++</span></a>
      <li><a href="#a-tour-of-c"><span class="secno"></span> <span class="content">A Tour of C++</span></a>
      <li><a href="#c-reference"><span class="secno"></span> <span class="content">C++ Reference</span></a>
     </ol>
    <li>
     <a href="#appendix-b-resources-for-teachers"><span class="secno"></span> <span class="content">Appendix B: Resources for Teachers</span></a>
     <ol class="toc">
      <li><a href="#stop-teaching-c"><span class="secno"></span> <span class="content">Stop Teaching C</span></a>
      <li><a href="#how-to-teach-c-and-influence-a-generation"><span class="secno"></span> <span class="content">How to Teach C++ and Influence a Generation</span></a>
      <li><a href="#the-design-and-evolution-of-c"><span class="secno"></span> <span class="content">The Design and Evolution of C++</span></a>
      <li><a href="#history-of-programming-languages-ii"><span class="secno"></span> <span class="content">History of Programming Languages II</span></a>
      <li><a href="#history-of-programming-languages-iii"><span class="secno"></span> <span class="content">History of Programming Languages III</span></a>
     </ol>
    <li><a href="#appendix-c-glossary"><span class="secno"></span> <span class="content">Appendix C: Glossary</span></a>
    <li>
     <a href="#references"><span class="secno"></span> <span class="content">References</span></a>
     <ol class="toc">
      <li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
     </ol>
   </ol>
  </nav>
  <main>
   <h2 class="heading settled" data-level="1" id="motivation-for-a-set-of-teaching-guidelines-for-beginners"><span class="secno">1. </span><span class="content">Motivation for a set of Teaching Guidelines for Beginners</span><a class="self-link" href="#motivation-for-a-set-of-teaching-guidelines-for-beginners"></a></h2>
   <h3 class="heading settled" data-level="1.1" id="who-is-a-beginner"><span class="secno">1.1. </span><span class="content">Who is a <a class="property" data-link-type="propdesc">beginner</a>?</span><a class="self-link" href="#who-is-a-beginner"></a></h3>
   <p>The term <a class="property" data-link-type="propdesc">beginner</a> in P1389 targets students who have previously written programs before, but have
little-to-zero training in writing C++ programs.</p>
   <h3 class="heading settled" data-level="1.2" id="why-beginner-guidelines"><span class="secno">1.2. </span><span class="content">Why beginner guidelines?</span><a class="self-link" href="#why-beginner-guidelines"></a></h3>
   <p>Introducing C++ to beginners is a delicate task, and is how novices develop their first impression
of the language. Novices should be guided, not by being presented with language features, but rather
how to write programs using C++. P1389 very strongly advocates for avoiding teaching beginners
low-level <a class="property" data-link-type="propdesc">things</a> such as pointers, bit hacking, explicit memory management, raw arrays, threads,
and so on, in the <i>early</i> stages of their development process. Similarly, beginners do not need
to be aware of the twenty-or-so fundamental types from the get-go.</p>
   <p>In order to prevent overwhelming novices-to-C++, P1389 requests that beginner guidelines recommend
beginners be exposed to a subset of C++ that encourages designing and engineering programs using the
lightweight abstractions that set C++ apart from other programming languages.</p>
   <p>These guidelines are not necessarily meant to be considered in isolation. For example, Dan Saks has
mentioned that introducing C++ to C programmers requires care in the first features that are
introduced, and -- in his experience -- that starting with <code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>vector</c-></code> as a <i>replacement</i> for
raw arrays early on is often counter-productive. P1389 does not propose a <i>C++ for C programmers</i> Standing Document, but recommends a later proposal do exactly that. Teachers designing curricula for
introducing C++ to C programmers would then be encouraged to encouraged read <i>both</i> guidelines.</p>
   <h2 class="heading settled" data-level="2" id="guidelines"><span class="secno">2. </span><span class="content">Guidelines</span><a class="self-link" href="#guidelines"></a></h2>
   <p>Each of the following subsections is a proposed guideline.</p>
   <h3 class="heading settled" data-level="2.1" id="what-are-beginner-topics"><span class="secno">2.1. </span><span class="content">What are beginner topics?</span><a class="self-link" href="#what-are-beginner-topics"></a></h3>
   <p>We divide beginner topics into three stages. Each stage represents prerequisite knowledge for the
next stage. The contents of a particular stage might be revised in later stages. For example, error
handling is necessary in Stage 1, but the topic should be re-visited later on so that error handling
is addressed in-depth.</p>
   <p>Beyond the stage partitions, these lists are sorted alphabetically. Chronological sorting is
intended to be a discussion point for SG20.</p>
   <h4 class="heading settled" data-level="2.1.1" id="stage-1-fundamentals"><span class="secno">2.1.1. </span><span class="content">Stage 1 (fundamentals)</span><a class="self-link" href="#stage-1-fundamentals"></a></h4>
   <ul>
    <li data-md>
     <p>algorithms (sequential)</p>
    <li data-md>
     <p>basic I/O</p>
    <li data-md>
     <p>computation constructs in C++ (expressions, sequence, selection, iteration)</p>
    <li data-md>
     <p><code class="highlight"><c- k>constexpr</c-></code> variables</p>
    <li data-md>
     <p>containers</p>
    <li data-md>
     <p>contracts</p>
    <li data-md>
     <p>designing and using functions and lambdas</p>
    <li data-md>
     <p>designing and using classes</p>
    <li data-md>
     <p>error handling (e.g. exceptions through helper functions, error types such as <code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>optional</c-></code> and <code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>expected</c-></code>)</p>
    <li data-md>
     <p>implicit and explicit conversions</p>
    <li data-md>
     <p>include directive</p>
    <li data-md>
     <p>iterator usage (simply comparison to <code class="highlight"><c- n>end</c-><c- p>(</c-><c- n>r</c-><c- p>)</c-></code> and <code class="highlight"><c- o>*</c-><c- n>i</c-></code>)</p>
    <li data-md>
     <p>modules</p>
    <li data-md>
     <p>operator overloading</p>
    <li data-md>
     <p>program design</p>
    <li data-md>
     <p>ranges</p>
    <li data-md>
     <p>references</p>
    <li data-md>
     <p>scoped enumerations</p>
    <li data-md>
     <p>testing (see PYYYY)</p>
    <li data-md>
     <p>the C++ compilation model</p>
    <li data-md>
     <p>the C++ memory model</p>
    <li data-md>
     <p>the C++ execution model</p>
    <li data-md>
     <p>tooling (e.g. compiler, debugger, package manager)</p>
    <li data-md>
     <p>types, objects, variables, and <code class="highlight"><c- k>const</c-></code></p>
   </ul>
   <p><i>Editor’s note: Discussion about <code class="highlight"><c- k>constexpr</c-></code> as a Stage 1 topic has happened between the author
and multiple reviewers, suggesting that consensus is lacking on this topic. It is requested that the
placement of <code class="highlight"><c- k>constexpr</c-></code> be a discussion point for SG20.</i></p>
   <h4 class="heading settled" data-level="2.1.2" id="stage-2-todo-name-me"><span class="secno">2.1.2. </span><span class="content">Stage 2 (todo: name me)</span><a class="self-link" href="#stage-2-todo-name-me"></a></h4>
   <ul>
    <li data-md>
     <p>algorithms (parallel)</p>
    <li data-md>
     <p>benchmarking</p>
    <li data-md>
     <p><code class="highlight"><c- k>constexpr</c-></code> functions</p>
    <li data-md>
     <p>derived types (for interface reasons -- implementation reasons to be pushed to <a class="property" data-link-type="propdesc">intermediate</a>)</p>
    <li data-md>
     <p>exceptions</p>
    <li data-md>
     <p>run-time polymorphism</p>
    <li data-md>
     <p>scope</p>
    <li data-md>
     <p>smart pointer use</p>
    <li data-md>
     <p>using libraries</p>
   </ul>
   <h4 class="heading settled" data-level="2.1.3" id="stage-3-todo-name-me"><span class="secno">2.1.3. </span><span class="content">Stage 3 (todo: name me)</span><a class="self-link" href="#stage-3-todo-name-me"></a></h4>
   <ul>
    <li data-md>
     <p>free store (and why you should avoid its direct usage)</p>
    <li data-md>
     <p>iterator use beyond Stage 1</p>
    <li data-md>
     <p>generic programming (a <i>gentle</i> introduction; rigor saved for <a class="property" data-link-type="propdesc">intermediate</a>)</p>
    <li data-md>
     <p><code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>pair</c-></code> and <code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>tuple</c-></code> (and why you should avoid them)</p>
    <li data-md>
     <p>RAII</p>
    <li data-md>
     <p>sum types (e.g. <code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>variant</c-></code>)</p>
    <li data-md>
     <p>templates (a <i>gentle</i> introduction; template metaprogramming strictly excluded)</p>
   </ul>
   <h4 class="heading settled" data-level="2.1.4" id="stage-4-todo-name-me"><span class="secno">2.1.4. </span><span class="content">Stage 4 (todo: name me)</span><a class="self-link" href="#stage-4-todo-name-me"></a></h4>
   <ul>
    <li data-md>
     <p>interoperability with C</p>
    <li data-md>
     <p>interoperability with older C++ projects</p>
    <li data-md>
     <p><code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>unordered_map</c-></code> and <code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>hash</c-></code></p>
   </ul>
   <p>It is no accident that Stage 1 is significantly larger than Stages 2, 3, and 4 combined. A large
portion of the contents of Stage 1 are chosen to help students develop both confidence in their use
of C++ and a strong appreciation for designing and implementing programs using C++.</p>
   <p><code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>unordered_map</c-></code> is considered a Stage 4 topic solely because of the necessary template
specialisations to have a custom type in the associative container. Students should be thoroughly
comfortable with templates before they are specialising <code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>hash</c-></code>.</p>
   <h3 class="heading settled" data-level="2.2" id="types-types"><span class="secno">2.2. </span><span class="content">[types] Types</span><a class="self-link" href="#types-types"></a></h3>
   <h4 class="heading settled" data-level="2.2.1" id="typesbasic-basic-types"><span class="secno">2.2.1. </span><span class="content">[types.basic] Basic types</span><a class="self-link" href="#typesbasic-basic-types"></a></h4>
   <p>C++ supports a great many built-in types. Depending on the C++ Standard being used, there are as
many as twenty one fundamental types in C++: eight distinct integer types, at least six distinct
character types (six in C++11 through C++17, seven in the C++20 WP), three distinct floating-point
types, <code class="highlight"><c- b>bool</c-></code>, <code class="highlight"><c- b>void</c-></code>, and <code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>nullptr_t</c-></code>. Further, there are the compound types, which include
arrays of objects, functions, possibly cv-qualified pointers, possibly cv-qualified lvalue
references, and possibly cv-qualified rvalue references, which some consider to be basic types,
because they are built-in types.</p>
   <p>An informal survey of textbooks and university courses done by the author has shown that many
resources immediately introduce all of the fundamental types sans <code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>nullptr_t</c-></code> and <code class="highlight"><c- n>char8_t</c-></code>,
and there are a nonzero amount that very quickly introduce raw arrays, pointers, and references.</p>
   <h5 class="heading settled" data-level="2.2.1.1" id="typesbasicprimary-primary-types"><span class="secno">2.2.1.1. </span><span class="content">[types.basic.primary] Primary types</span><a class="self-link" href="#typesbasicprimary-primary-types"></a></h5>
   <p>C++ novices rarely -- if ever -- have any need for more than a handful of types. In order to reduce
the cognitive load on beginners, avoid introducing more than one of each fundamental type, postpone
references until there is a relevant use-case, and avoid raw arrays and pointers for as long as
possible.</p>
   <p>The table below recommends these as the primary types for beginners.</p>
   <table>
    <tbody>
     <tr>
      <th>Abstract type
      <th>
       <center>Pre-C++20 type</center>
      <th>
       <center>Post-C++20 type</center>
     <tr>
      <td>Integer
      <td>
       <center><code class="highlight"><c- b>int</c-></code></center>
      <td>
       <center><code class="highlight"><c- b>int</c-></code></center>
     <tr>
      <td>Floating-point
      <td>
       <center><code class="highlight"><c- b>double</c-></code></center>
      <td>
       <center><code class="highlight"><c- b>double</c-></code></center>
     <tr>
      <td>Boolean
      <td>
       <center><code class="highlight"><c- b>bool</c-></code></center>
      <td>
       <center><code class="highlight"><c- b>bool</c-></code></center>
     <tr>
      <td>Character
      <td>
       <center><code class="highlight"><c- b>char</c-></code></center>
      <td>
       <center><code class="highlight"><c- n>char8_t</c-></code></center>
     <tr>
      <td>String
      <td>
       <center><code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>string</c-></code></center>
      <td>
       <center><code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>u8string</c-></code></center>
     <tr>
      <td>Sequence container
      <td>
       <center><code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>vector</c-></code></center>
      <td>
       <center><code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>vector</c-></code></center>
     <tr>
      <td>Associative container
      <td>
       <center><code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>map</c-></code></center>
      <td>
       <center><code class="highlight"><c- n>std</c-><c- o>::</c-><c- n>map</c-></code></center>
   </table>
   <p>The distinction between pre-C++20 and C++20 is simply the acknowldgement of UTF-8. This is not to
suggest that students should be introduced to the details of UTF-8 any earlier, but rather to get
the idea of UTF-8 support on their radar, so that when they need to care about locales, they won’t
need to shift from thinking about why <code class="highlight"><c- b>char</c-></code> is insufficient in the current programming world: they
can just start using what they are already familiar with.</p>
   <h5 class="heading settled" data-level="2.2.1.2" id="typesbasicconversions-conversions"><span class="secno">2.2.1.2. </span><span class="content">[types.basic.conversions] Conversions</span><a class="self-link" href="#typesbasicconversions-conversions"></a></h5>
   <p>Although discouraged whenever possible, conversions in C++ are sometimes necessary, and we cannot
completely insulate beginners from this. [types.conversions] recommends that beginners be introduced
to safe conversions (such as promotions) and unsafe conversions (such as implicit narrowing
conversions).</p>
<pre class="language-cpp highlight"><c- k>auto</c-> <c- n>c</c-> <c- o>=</c-> <c- sc>'a'</c-><c- p>;</c->
<c- k>auto</c-> <c- n>i</c-> <c- o>=</c-> <c- mi>0</c-><c- p>;</c->

<c- n>i</c-> <c- o>=</c-> <c- n>c</c-><c- p>;</c-> <c- c1>// okay, promotion</c->
<c- n>c</c-> <c- o>=</c-> <c- n>i</c-><c- p>;</c-> <c- c1>// not okay, implicitly narrows</c->

<c- n>i</c-> <c- o>=</c-> <c- k>static_cast</c-><c- o>&lt;</c-><c- b>int</c-><c- o>></c-><c- p>(</c-><c- n>c</c-><c- p>);</c-> <c- c1>// okay, but superfluous</c->
<c- n>c</c-> <c- o>=</c-> <c- k>static_cast</c-><c- o>&lt;</c-><c- b>int</c-><c- o>></c-><c- p>(</c-><c- n>i</c-><c- p>);</c-> <c- c1>// okay, explicit narrowing</c->
<c- n>c</c-> <c- o>=</c-> <c- n>gsl</c-><c- o>::</c-><c- n>narrow_cast</c-><c- o>&lt;</c-><c- b>int</c-><c- o>></c-><c- p>(</c-><c- n>i</c-><c- p>);</c-> <c- c1>// better, explicit narrowing with a description</c->
</pre>
   <h4 class="heading settled" data-level="2.2.2" id="typesconst-constness"><span class="secno">2.2.2. </span><span class="content">[types.const] Constness</span><a class="self-link" href="#typesconst-constness"></a></h4>
   <h5 class="heading settled" data-level="2.2.2.1" id="typesconstconstexpr-encourage-constexpr-values-whenever-it-is-possible"><span class="secno">2.2.2.1. </span><span class="content">[types.const.constexpr] Encourage <code class="highlight"><c- k>constexpr</c-></code> values whenever it is possible</span><a class="self-link" href="#typesconstconstexpr-encourage-constexpr-values-whenever-it-is-possible"></a></h5>
   <p><code class="highlight"><c- k>constexpr</c-></code> is a good way to ensure that values remain constant, and <i>variables</i> that are <code class="highlight"><c- k>constexpr</c-></code> are constant expressions*.</p>
   <p>As a general rule, default to <code class="highlight"><c- k>constexpr</c-></code> unless something can only be known at run-time. <code class="highlight"><c- n>vector</c-></code> and <code class="highlight"><c- n>string</c-></code> always require run-time knowledge, so they cannot be <code class="highlight"><c- k>const</c-></code>.</p>
   <p>*Recommending <code class="highlight"><c- k>constexpr</c-></code> does not mean explaining what a constant expression is. This is a separate
discussion. For now, we can say "known at compile time".</p>
   <h5 class="heading settled" data-level="2.2.2.2" id="typesconstconst-encourage-const-whenever-you-cant-use-constexpr"><span class="secno">2.2.2.2. </span><span class="content">[types.const.const] Encourage <code class="highlight"><c- k>const</c-></code> whenever you can’t use <code class="highlight"><c- k>constexpr</c-></code></span><a class="self-link" href="#typesconstconst-encourage-const-whenever-you-cant-use-constexpr"></a></h5>
   <p><code class="highlight"><c- k>const</c-></code> lets us reason about our programs with security and helps us produce more declarative code.
Rather than suggesting that <code class="highlight"><c- k>const</c-></code> is applied when you know that a value won’t (or can’t) change,
offer <code class="highlight"><c- k>const</c-></code> as the default, and suggest students <i>remove</i> <code class="highlight"><c- k>const</c-></code> when they encounter a
reason to mutate the variable.</p>
   <p><i>Editor’s note: [types.const.const] does <b>not</b> suggest introducing lambda-initialisation
(IILE).</i></p>
   <p><i>Editor’s note: [types.const.const] becomes more and more easy-to-use when ranges are incorporated
into a program.</i></p>
   <h5 class="heading settled" data-level="2.2.2.3" id="typesconstmutable-dont-pan-mutable"><span class="secno">2.2.2.3. </span><span class="content">[types.const.mutable] Don’t pan <code class="highlight"><c- k>mutable</c-></code></span><a class="self-link" href="#typesconstmutable-dont-pan-mutable"></a></h5>
   <p>TODO</p>
   <p>(should <code class="highlight"><c- k>mutable</c-></code> even be a topic for beginners? probably a stage 3 topic?)</p>
   <h4 class="heading settled" data-level="2.2.3" id="typesmonadic-types-with-monadic-interfaces"><span class="secno">2.2.3. </span><span class="content">[types.monadic] Types with monadic interfaces</span><a class="self-link" href="#typesmonadic-types-with-monadic-interfaces"></a></h4>
   <p>TODO (visit after <a data-link-type="biblio" href="#biblio-p0798">[P0798]</a> receives a verdict).</p>
   <h3 class="heading settled" data-level="2.3" id="delay-delay-features-until-there-is-a-genuine-use-case"><span class="secno">2.3. </span><span class="content">[delay] Delay features until there is a genuine use-case</span><a class="self-link" href="#delay-delay-features-until-there-is-a-genuine-use-case"></a></h3>
   <p>[basic.types] explicitly recommends avoiding the introduction of most fundamental types early on,
as there is no use-case. Similarly, raw arrays, pointers, and even references are not considered
members of [basic.types], as students will not appreciate them.</p>
   <h4 class="heading settled" data-level="2.3.1" id="delayreferences-references"><span class="secno">2.3.1. </span><span class="content">[delay.references] References</span><a class="self-link" href="#delayreferences-references"></a></h4>
    The author has found multiple resources that introduce pointers or references in the following
fashion: 
<pre class="language-cpp highlight"><c- c1>// replicated introduction, not from an actual source</c->
<c- b>int</c-> <c- n>i</c-> <c- o>=</c-> <c- mi>0</c-><c- p>;</c->
<c- b>int</c-><c- o>&amp;</c-> <c- n>r</c-> <c- o>=</c-> <c- n>i</c-><c- p>;</c->

<c- n>std</c-><c- o>::</c-><c- n>cout</c-> <c- o>&lt;&lt;</c-> <c- s>"i == "</c-> <c- o>&lt;&lt;</c-> <c- n>i</c-> <c- o>&lt;&lt;</c-> <c- s>"</c-><c- se>\n</c-><c- s>"</c->
   <c- s>"r == "</c-> <c- o>&lt;&lt;</c-> <c- n>r</c-> <c- o>&lt;&lt;</c-> <c- sc>'\n'</c-><c- p>;</c->
<c- n>i</c-> <c- o>=</c-> <c- mi>5</c-><c- p>;</c->
<c- n>std</c-><c- o>::</c-><c- n>cout</c-> <c- o>&lt;&lt;</c-> <c- s>"i == "</c-> <c- o>&lt;&lt;</c-> <c- n>i</c-> <c- o>&lt;&lt;</c-> <c- s>"</c-><c- se>\n</c-><c- s>"</c->
   <c- s>"r == "</c-> <c- o>&lt;&lt;</c-> <c- n>r</c-> <c- o>&lt;&lt;</c-> <c- sc>'\n'</c-><c- p>;</c->

<c- n>r</c-> <c- o>=</c-> <c- o>-</c-><c- mi>5</c-><c- p>;</c->
<c- n>std</c-><c- o>::</c-><c- n>cout</c-> <c- o>&lt;&lt;</c-> <c- s>"i == "</c-> <c- o>&lt;&lt;</c-> <c- n>i</c-> <c- o>&lt;&lt;</c-> <c- s>"</c-><c- se>\n</c-><c- s>"</c->
   <c- s>"r == "</c-> <c- o>&lt;&lt;</c-> <c- n>r</c-> <c- o>&lt;&lt;</c-> <c- sc>'\n'</c-><c- p>;</c->
</pre>
   <p>The above code offers no context for why references are necessary: only that reading and modifying <code class="highlight"><c- n>r</c-></code> is synonymous to reading and modifying <code class="highlight"><c- n>i</c-></code>, respectively. Without a genuine use-case, references
can make seem C++ look rather quirky! Instead, it is recommended that students be exposed to
references in a practical fashion, such as when passing parameters to functions.</p>
   <h4 class="heading settled" data-level="2.3.2" id="delaypointers-pointers"><span class="secno">2.3.2. </span><span class="content">[delay.pointers] Pointers</span><a class="self-link" href="#delaypointers-pointers"></a></h4>
   <p>Given that pointers solve a similar problem to references in terms of indirection, they share what
is mentioned in [delay.references]. While pointers are an important part of C++ programming, their
use-cases have been severely diminished thanks to references and abstractions such as <code class="highlight"><c- n>vector</c-></code> and <code class="highlight"><c- n>map</c-></code>.</p>
   <p>References should definitely precede pointers by quite some time. This simplifies the idea of using
C++ by eliminating syntax that often isn’t necessary. Kate Gregory expands on this idea in <a data-link-type="biblio" href="#biblio-stop-teaching-c">[Stop-Teaching-C]</a>.</p>
   <h4 class="heading settled" data-level="2.3.3" id="delayiterators-iterators"><span class="secno">2.3.3. </span><span class="content">[delay.iterators] Iterators</span><a class="self-link" href="#delayiterators-iterators"></a></h4>
   <p>Iterators are a fundamental part of the standard library, which means that they can’t be avoided in
the context of standard library usage. The suggested guideline is for initial iterator usage:</p>
<pre class="language-cpp highlight"><c- c1>// find gets a result                        // result != end(images) asks "did we find an image?"</c->
<c- k>if</c-> <c- p>(</c-><c- k>auto</c-> <c- n>result</c-> <c- o>=</c-> <c- n>find</c-><c- p>(</c-><c- n>images</c-><c- p>,</c-> <c- n>date</c-><c- p>,</c-> <c- o>&amp;</c-><c- n>image</c-><c- o>::</c-><c- n>date</c-><c- p>);</c-> <c- n>result</c-> <c- o>!=</c-> <c- n>end</c-><c- p>(</c-><c- n>images</c-><c- p>))</c-> <c- p>{</c->
   <c- c1>// 'training wheels'; *result gets the image, but then we go back to references to avoid</c->
   <c- c1>// funky syntax beyond operator* as a 'get' function.</c->
   <c- k>auto</c-> <c- k>const</c-><c- o>&amp;</c-> <c- n>read</c-> <c- o>=</c-> <c- o>*</c-><c- n>result</c-><c- p>;</c->
   <c- n>display</c-><c- p>(</c-><c- n>read</c-><c- p>);</c->

   <c- k>auto</c-><c- o>&amp;</c-> <c- n>read_write</c-> <c- o>=</c-> <c- o>*</c-><c- n>result</c-><c- p>;</c->
   <c- n>change_hue</c-><c- p>(</c-><c- n>read_write</c-><c- p>,</c-> <c- n>hue</c-><c- p>);</c->
   <c- n>display</c-><c- p>(</c-><c- n>read_write</c-><c- p>)</c->
<c- p>}</c->
<c- c1>// can’t use result outside of the condition</c->
</pre>
   <p>There has been a comment on why <code class="highlight"><c- n>display</c-><c- p>(</c-><c- o>*</c-><c- n>result</c-><c- p>)</c-></code> is not directly applied. The above guideline does
two things:</p>
   <ol>
    <li data-md>
     <p>Keeps students away from the quirky syntax of iterators. Default to references.</p>
    <li data-md>
     <p>Gets students into the mindest that an iterator’s <code class="highlight"><c- k>operator</c-><c- o>*</c-></code> returns a reference.</p>
   </ol>
   <h4 class="heading settled" data-level="2.3.4" id="delayconceptdefinitions-concept-definitions"><span class="secno">2.3.4. </span><span class="content">[delay.concept.definitions] Concept definitions</span><a class="self-link" href="#delayconceptdefinitions-concept-definitions"></a></h4>
   <p>Designing a concept is a lot of work, and is arguably an advanced topic; the world’s foremost
experts on the topic have stated that designing effective concepts comes after one has studied the
details of algorithms. Even the definition for <code class="highlight"><c- n>EqualityComparable</c-></code> is much more than just checking
that <code class="highlight"><c- n>a</c-> <c- o>==</c-> <c- n>b</c-></code> and <code class="highlight"><c- n>a</c-> <c- o>!=</c-> <c- n>b</c-></code> are syntactically possible.</p>
   <p>This recommendation does not preculude the introduction of <i>using</i> existing concepts.</p>
   <h4 class="heading settled" data-level="2.3.5" id="delaycpp-c-preprocessor"><span class="secno">2.3.5. </span><span class="content">[delay.cpp] C Preprocessor</span><a class="self-link" href="#delaycpp-c-preprocessor"></a></h4>
   <p>Excludes <code class="highlight"><c- cp>#include</c-></code>, which is necessary until modules are in C++.</p>
   <p>TODO</p>
   <h3 class="heading settled" data-level="2.4" id="style-style-practices"><span class="secno">2.4. </span><span class="content">[style] Style practices</span><a class="self-link" href="#style-style-practices"></a></h3>
   <h4 class="heading settled" data-level="2.4.1" id="styleguide-use-a-style-guide"><span class="secno">2.4.1. </span><span class="content">[style.guide] Use a style guide</span><a class="self-link" href="#styleguide-use-a-style-guide"></a></h4>
   <ul>
    <li data-md>
     <p>Recommended style guide: <a href="http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines">C++ Core Guidelines</a>.</p>
    <li data-md>
     <p>See also: <a href="#toolscodeformatter-use-a-code-formatter">Use a code formatter</a></p>
    <li data-md>
     <p>See also: <a href="#toolslinter-use-linters">Use a linter</a></p>
   </ul>
   <p>TODO (why?)</p>
   <h4 class="heading settled" data-level="2.4.2" id="stylenaming-use-consistent-set-of-naming-conventions-for-identifiers"><span class="secno">2.4.2. </span><span class="content">[style.naming] Use consistent set of naming conventions for identifiers</span><a class="self-link" href="#stylenaming-use-consistent-set-of-naming-conventions-for-identifiers"></a></h4>
    (e.g., names of variables, types, etc.) 
   <p>To whatever extent is possible, a consistent set of naming conventions
for identifiers should be employed.  This practice helps to greatly
improve the readability of code, amongst other things.  Many popular
naming conventions exist, and there are likely equally many opinions
as to which one is best.  Therefore, no attempt is made to advocate
a particular one here.  For examples of naming conventions that could
be used, please refer to some of the popular style guides.</p>
   <h4 class="heading settled" data-level="2.4.3" id="styleall_caps-avoid-all_caps-names"><span class="secno">2.4.3. </span><span class="content">[style.<code class="highlight"><c- n>ALL_CAPS</c-></code>] Avoid <code class="highlight"><c- n>ALL_CAPS</c-></code> names</span><a class="self-link" href="#styleall_caps-avoid-all_caps-names"></a></h4>
   <p>The use of <code class="highlight"><c- n>ALL_CAPS</c-></code> is commonly reserved for macros. Developer tools, such as compilers and IDEs
are able to quickly detect when a programmer is trying to write to something that is read-only (e.g.
a constant).</p>
   <p>Associated Core Guidelines:</p>
   <ul>
    <li data-md>
     <p><a href="http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Renum-caps">Enum.5: Don’t use ALL_CAPS for enumerators</a></p>
    <li data-md>
     <p><a href="http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-not-CAPS">ES.9: Avoid ALL_CAPS names</a></p>
    <li data-md>
     <p><a href="http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-ALL_CAPS">ES.32: Use ALL_CAPS for all macro names</a></p>
    <li data-md>
     <p><a href="http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rl-all-caps">NL.9: Use ALL_CAPS for macro names only</a></p>
   </ul>
   <p><i> <b>Editor’s note:</b> Due to the lack of consensus, no other naming guidelines are made for variable
or type names. <code class="highlight"><c- n>ALL_CAPS</c-></code> are the exception because there appears to be a large enough consensus
across multiple well-known style guides (Core Guidelines, Google Style Guide, and Mozilla Coding
Style). </i></p>
   <h3 class="heading settled" data-level="2.5" id="projects-projects"><span class="secno">2.5. </span><span class="content">[projects] Projects</span><a class="self-link" href="#projects-projects"></a></h3>
   <p>TODO (what?, why?, how?, where?, when?, how many?)</p>
   <h3 class="heading settled" data-level="2.6" id="tools-tools"><span class="secno">2.6. </span><span class="content">[tools] Tools</span><a class="self-link" href="#tools-tools"></a></h3>
   <p>Students should be introduced to a variety of basic tools for code development
relatively early in the learning process (not later as an afterthought).
The effective use of tools is important because this can make many tasks
much easier, from formatting source code to testing and debugging.
Not introducing at least some basic tools to the student will make their
programming experience unnecessarily difficult and discourage the
student from learning.</p>
   <h4 class="heading settled" data-level="2.6.1" id="toolscompilers-use-an-up-to-date-compiler"><span class="secno">2.6.1. </span><span class="content">[tools.compilers] Use an up-to-date compiler</span><a class="self-link" href="#toolscompilers-use-an-up-to-date-compiler"></a></h4>
   <p>The C++ language and standard library have been evolving rapidly in
recent years.  In order to ensure that newer language and library
features are available, an up-to-date compiler is essential.
Even if all of the latest language/library features are not
needed for a course, using an up-to-date compiler is important for
another reason.
In particular, modern compilers have significantly improved error messages,
making it easier for novices to find and correct their errors.</p>
   <p>At the time of this writing, the most recent versions of several
popular compilers are as follows:</p>
   <ul>
    <li data-md>
     <p>GCC: version 8</p>
    <li data-md>
     <p>Clang: version 7</p>
    <li data-md>
     <p>MSVC: version 2017 (with updates)</p>
   </ul>
   <h5 class="heading settled" data-level="2.6.1.1" id="toolsmultiplecompilers-use-two-or-more-competing-compilers"><span class="secno">2.6.1.1. </span><span class="content">[tools.multiple.compilers] Use two or more competing compilers</span><a class="self-link" href="#toolsmultiplecompilers-use-two-or-more-competing-compilers"></a></h5>
   <p>No compiler is perfect.  Some provide better diagnostics for certain
types of problems than others.  Giving the student the ability to
use more than one compiler can be helpful when the error message from
one compiler is not as enlightening as one would like.
Also, some tools may only be available for a particular compiler.
Therefore, in order to best utilize various tools, it is helpful for
the student to be comfortable using more than one compiler.</p>
   <h4 class="heading settled" data-level="2.6.2" id="toolscompilerwarnings-use-a-high-level-of-warnings-and-enable-warnings-as-error-mode"><span class="secno">2.6.2. </span><span class="content">[tools.compiler.warnings] Use a high level of warnings and enable 'warnings as error' mode</span><a class="self-link" href="#toolscompilerwarnings-use-a-high-level-of-warnings-and-enable-warnings-as-error-mode"></a></h4>
   <p>Students should be taught to understand that the compiler is their friend.
It can catch many problems in their code.
Compiler warnings are one way in which the compiler can help the student
to find problems in their code (such as a function with a missing
return statement).</p>
   <p>For example, one might use the following compiler flags:</p>
   <ul>
    <li data-md>
     <p>Minimum for GCC and Clang: <code class="highlight"><c- o>-</c-><c- n>Wall</c-> <c- o>-</c-><c- n>Wextra</c-> <c- o>-</c-><c- n>pedantic</c-> <c- o>-</c-><c- n>Werror</c-></code></p>
    <li data-md>
     <p>Minimum for MSVC: <code class="highlight"><c- o>/</c-><c- n>W3</c-> <c- o>/</c-><c- n>WX</c-></code></p>
   </ul>
   <h4 class="heading settled" data-level="2.6.3" id="toolstesting-introduce-a-testing-framework"><span class="secno">2.6.3. </span><span class="content">[tools.testing] Introduce a testing framework</span><a class="self-link" href="#toolstesting-introduce-a-testing-framework"></a></h4>
   <p>Examples: <a href="https://github.com/catchorg/Catch2">Catch2</a>, <a href="https://github.com/google/googletest">Google Test</a></p>
   <p>Testing code is often viewed as tedious and boring by students, which
discourages students from investing the time to properly test code.  By
using a testing framework, some of the monotony of testing can be
reduced by eliminating the need for students to repeat boilerplate code
that would be automatically provided by a test framework.   By making
testing less tedious to perform, students will be more motivated to do
it well.  Moreover, if a test framework that is popular in industry is
chosen for teaching purposes, students will be further motivated by the
knowledge that they are learning a useful tool in addition to developing
their testing skills.</p>
   <h4 class="heading settled" data-level="2.6.4" id="toolsdebugger-introduce-a-debugger-early"><span class="secno">2.6.4. </span><span class="content">[tools.debugger] Introduce a debugger early</span><a class="self-link" href="#toolsdebugger-introduce-a-debugger-early"></a></h4>
   <p>Examples: Visual Studio Debugger, GDB, LLDB</p>
   <p>The ability to step through running code and examine execution state will enable students to
troubleshoot issues and correct assumptions they have made about the behavior of language and
library features.</p>
   <h4 class="heading settled" data-level="2.6.5" id="toolspackagemanagement-use-a-package-manager"><span class="secno">2.6.5. </span><span class="content">[tools.package.management] Use a package manager</span><a class="self-link" href="#toolspackagemanagement-use-a-package-manager"></a></h4>
   <p>Examples: <a href="https://github.com/Microsoft/vcpkg">Vcpkg</a>, <a href="https://conan.io/">Conan</a></p>
   <p>Downloading, installing, and building against dependencies in C++ can be a challenge, especially
for beginners. Package managers help alleviate this by providing tested packages along with
automatic installation scripts.</p>
   <h4 class="heading settled" data-level="2.6.6" id="toolsbuildsystem-use-a-build-system"><span class="secno">2.6.6. </span><span class="content">[tools.build.system] Use a build system</span><a class="self-link" href="#toolsbuildsystem-use-a-build-system"></a></h4>
   <p>Example: <a href="https://cmake.org/">CMake</a>, <a href="https://mesonbuild.com/">Meson</a>, <a href="https://build2.org/">build2</a></p>
   <p>Build systems greatly aid building code across a variety of platforms. Without a build system,
you will either require:</p>
   <ol>
    <li data-md>
     <p>A uniform development environment for all students</p>
    <li data-md>
     <p>Build instructions across a variety of supported environments, accounting for dependency
installation locations, compiler, toolchain version, etc.</p>
   </ol>
   <p>Neither of these are great solutions: you either need to ensure that all students have the
necessary hardware and software to support the canonical environment and provide support for it,
or you need to do a considerable amount of work to produce the necessary build instructions. Just
use a build system.</p>
   <h4 class="heading settled" data-level="2.6.7" id="toolsonlinecompiler-introduce-online-compilers"><span class="secno">2.6.7. </span><span class="content">[tools.online.compiler] Introduce online compilers</span><a class="self-link" href="#toolsonlinecompiler-introduce-online-compilers"></a></h4>
   <p>Examples:</p>
   <ul>
    <li data-md>
     <p><a href="https://godbolt.org/">Compiler Explorer</a></p>
    <li data-md>
     <p><a href="https://wandbox.org/">Wandbox</a></p>
    <li data-md>
     <p><a href="http://coliru.stacked-crooked.com/">Coliru</a></p>
    <li data-md>
     <p><a href="https://cppinsights.io/">C++ Insights</a></p>
   </ul>
   <p>Online compilers are invaluable tools for communicating about small snippets of code. Depending on
the tool, they let the user compile programs using multiple toolchains, check the output of their
code, and share the snippets with others.</p>
   <p>Compiler Explorer’s live updates can be particularly useful when experimenting with new features.
The assembly view could overwhelm students however, so care should be taken when introducing this
tool.</p>
   <p>C++ Insights is a source-code transformation tool that can be
particularly useful for helping the student to understand how the
compiler views various types of code constructs in the language.
For example, source code containing a lambda expression can be transformed
by the tool into new (equivalent) source code that shows the closure type
generated by the lambda expression.
Many other code constructs are also handled by the tool
(such as range-based for loops and structured bindings).</p>
   <h4 class="heading settled" data-level="2.6.8" id="toolscodeformatter-use-a-code-formatter"><span class="secno">2.6.8. </span><span class="content">[tools.code.formatter] Use a code formatter</span><a class="self-link" href="#toolscodeformatter-use-a-code-formatter"></a></h4>
   <p>Examples: <a href="https://clang.llvm.org/docs/ClangFormat.html">Clang Format</a></p>
   <p>Choosing a code formatter and picking a canonical style (it doesn’t really matter which one) will
avoid some code style arguments and improve uniformity among student’s code. The latter will make
marking and comparing solutions easier.</p>
   <h4 class="heading settled" data-level="2.6.9" id="toolslinter-use-linters"><span class="secno">2.6.9. </span><span class="content">[tools.linter] Use linters</span><a class="self-link" href="#toolslinter-use-linters"></a></h4>
   <p>Example: <a href="http://clang.llvm.org/extra/clang-tidy/">Clang Tidy</a></p>
   <p>Static analysis tools are extremely useful for finding certain types of
bugs or other problems in code.
Students should be introduced to at least some basic static analysis tools
(such as linters, like Clang Tidy)
in order to instill the basic principle of finding bugs early
(i.e., at compile time).</p>
   <h4 class="heading settled" data-level="2.6.10" id="toolsruntimeanalysis-use-run-time-analysers-especially-when-teaching-free-store"><span class="secno">2.6.10. </span><span class="content">[tools.runtime.analysis] Use run-time analysers, especially when teaching free store</span><a class="self-link" href="#toolsruntimeanalysis-use-run-time-analysers-especially-when-teaching-free-store"></a></h4>
   <p>Examples: <a href="https://github.com/google/sanitizers/wiki/AddressSanitizer">Address Sanitizer (ASan)</a>, <a href="https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html">Undefined Behavior Sanitizer (UBSan)</a></p>
   <p>Dynamic analysis tools can greatly improve the rigor with which code can be
tested and also help to isolate bugs more quickly.
Student should be introduced to basic dynamic analysis tools (such as
ASan and UBSan) as such tools will help the student to more easily
find problems in their code and also perhaps teach them that code
that appears to run correctly can still have serious bugs that can be
caught by such tools.</p>
   <p>Notes: WSL does not play nicely with ASan, but a Docker image running inside WSL does.</p>
   <h3 class="heading settled" data-level="2.7" id="appreciation-appreciation-for-c"><span class="secno">2.7. </span><span class="content">[appreciation] Appreciation for C++</span><a class="self-link" href="#appreciation-appreciation-for-c"></a></h3>
   <h4 class="heading settled" data-level="2.7.1" id="appreciationhistory-history"><span class="secno">2.7.1. </span><span class="content">[appreciation.history] History</span><a class="self-link" href="#appreciationhistory-history"></a></h4>
   <p>Do not introduce historical aspects of C++ in the forefront of C++ education. This includes:</p>
   <blockquote>
    <p>"C++ was developed by Bjarne Stroustrup in 1983 at Bell Labs as an extension to C and was
previously known as 'C with Classes'..."</p>
   </blockquote>
   <p><i>-- paraphrased introduction to C++ from many textbooks and courses informally surveyed by the
author.</i></p>
   <blockquote>
    <p>"In the past we used SFINAE, which looks like <em>this</em>, now we use concepts..."</p>
   </blockquote>
   <blockquote>
    <p>"<code class="highlight"><c- b>int</c-> <c- n>x</c-><c- p>[]</c-> <c- o>=</c-> <c- p>{</c-><c- mi>0</c-><c- p>,</c-> <c- mi>1</c-><c- p>,</c-> <c- mi>2</c-><c- p>,</c-> <c- p>...}</c-></code> is called an array and is how you store a group of objects..."</p>
   </blockquote>
   <blockquote>
    <p>"<code class="highlight"><c- n>printf</c-></code> is used to write to screen..."</p>
   </blockquote>
   <p><i>-- paraphrased introductions to topics the author has seen.</i></p>
   <p>C with Classes was the immediate predecessor to C++, not an alternative name. This kind of statement
helps embed the idea that C++ is simply 'C plus more', which is detrimental to a beginner’s
development of C++. It also incorrectly captures C++'s essence, which is not merely an extension to
C, but also a <i>fusion</i> of ideals from Simula<a data-link-type="biblio" href="#biblio-ppp">[PPP]</a><a data-link-type="biblio" href="#biblio-dne">[dne]</a> to support high-level abstractions
in a lightweight fashion. In the author’s experience, prematurely and inaccurately capturing the
history of C++ gets programmers experienced with C into the mindset that programs engineered using
C++ should be written in the image of C programs, and those who lack experience with C thinking that
knowledge of C is a prerequisite.</p>
   <p>While there is a very long history of C in C++<a data-link-type="biblio" href="#biblio-dne">[dne]</a>, this is not beneficial to beginners up-front,
and should be pushed to a later time when students are able to appreciate history without first
being exposed to the error-prone ways of the past. C++ programmers will eventually need to work with
older code (pre-C++17 code is abundant), or write code that has C interoperability, and thus
developing an appreciation for C++'s history is imperative (sic).</p>
   <p>P1389 makes the case for it not to be in the first handful of unit.</p>
   <h4 class="heading settled" data-level="2.7.2" id="appreciationirl-c-in-the-real-world"><span class="secno">2.7.2. </span><span class="content">[appreciation.irl] C++ in the Real World</span><a class="self-link" href="#appreciationirl-c-in-the-real-world"></a></h4>
   <p>C++ has a broad range of applications. A non-exhaustive list of domains that C++ is used in can
be found below, a large portion of which are derived from<a data-link-type="biblio" href="#biblio-applications">[applications]</a>.</p>
   <ul>
    <li data-md>
     <p>embedded System on a Chips (e.g. Renesas' R-Car H3<a data-link-type="biblio" href="#biblio-rcar">[rcar]</a>)</p>
    <li data-md>
     <p>financial systems (e.g. Morgan Stanley; Bloomberg<a data-link-type="biblio" href="#biblio-bloomberg">[bloomberg]</a>; IMC Financial Markets<a data-link-type="biblio" href="#biblio-imc">[imc]</a>)</p>
    <li data-md>
     <p>graphics programming (e.g. Adobe technologies <a data-link-type="biblio" href="#biblio-adobe">[adobe]</a>; Mentor Graphics <a data-link-type="biblio" href="#biblio-mentor">[mentor]</a>)</p>
    <li data-md>
     <p>middleware solutions (Codeplay Software<a data-link-type="biblio" href="#biblio-codeplay">[codeplay]</a>; id Tech 4<a data-link-type="biblio" href="#biblio-id4">[id4]</a>)</p>
    <li data-md>
     <p>operating systems (e.g. Windows<a data-link-type="biblio" href="#biblio-win32">[win32]</a>)</p>
    <li data-md>
     <p>scientific computing (e.g. CERN)</p>
    <li data-md>
     <p>space technologies (e.g. NASA’s Mars Rovers, James Webb Telescope)</p>
    <li data-md>
     <p>video games (e.g. Creative Assembly)</p>
    <li data-md>
     <p>web-based technologies (e.g. Google, Facebook, Amazon)</p>
   </ul>
   <p>It is recommended that teachers briefly introduce a domain to their students during each unit.
This practice has helped to broaden student appreciation for the usage of C++ in industry. Embedding
use-cases into classes to show "this has practical value in the real world" should be considered.</p>
   <h3 class="heading settled" data-level="2.8" id="meta-meta-guidelines"><span class="secno">2.8. </span><span class="content">[meta] Meta-guidelines</span><a class="self-link" href="#meta-meta-guidelines"></a></h3>
   <p>This section is <b>not</b> about metaprogramming, but rather about guidelines for teachers to their
teaching processes.</p>
   <h4 class="heading settled" data-level="2.8.1" id="metarevision-regularly-revise-the-curriculum"><span class="secno">2.8.1. </span><span class="content">[meta.revision] Regularly revise the curriculum</span><a class="self-link" href="#metarevision-regularly-revise-the-curriculum"></a></h4>
   <p>This is a living document, and will often change. It is strongly advised that you revise your
curriculum between sessions to ensure that it does not stagnate or become out-of-sync with these
guidelines.</p>
   <h2 class="heading settled" data-level="3" id="student-outcomes"><span class="secno">3. </span><span class="content">Student outcomes</span><a class="self-link" href="#student-outcomes"></a></h2>
   <p>Upon completion, a student should be able to:</p>
   <h3 class="heading settled" data-level="3.1" id="containers"><span class="secno">3.1. </span><span class="content">Containers</span><a class="self-link" href="#containers"></a></h3>
   <p>TODO</p>
   <h3 class="heading settled" data-level="3.2" id="algorithms-and-ranges"><span class="secno">3.2. </span><span class="content">Algorithms and ranges</span><a class="self-link" href="#algorithms-and-ranges"></a></h3>
   <p>TODO</p>
   <h3 class="heading settled" data-level="3.3" id="error-handling"><span class="secno">3.3. </span><span class="content">Error handling</span><a class="self-link" href="#error-handling"></a></h3>
   <p>TODO</p>
   <h3 class="heading settled" data-level="3.4" id="testing"><span class="secno">3.4. </span><span class="content">Testing</span><a class="self-link" href="#testing"></a></h3>
   <p>See PYYYY for now.</p>
   <h3 class="heading settled" data-level="3.5" id="tool-outcomes"><span class="secno">3.5. </span><span class="content">Tool outcomes</span><a class="self-link" href="#tool-outcomes"></a></h3>
   <ul>
    <li data-md>
     <p>invoke a compiler in debug and release modes</p>
    <li data-md>
     <p>understand why using multiple compilers is important for writing well-formed C++</p>
    <li data-md>
     <p>understand why a high level of warnings is important for writing well-reasoned C++</p>
     <ul>
      <li data-md>
       <p>understand why enforcing 'warnings as errors' mode is an important step up from just warnings</p>
     </ul>
    <li data-md>
     <p>configure a project</p>
     <ul>
      <li data-md>
       <p>add and remove targets using the build system (IDE leverage a good practice)</p>
      <li data-md>
       <p>add and remove packages using a package manager</p>
     </ul>
    <li data-md>
     <p>utilise a debugger, including</p>
     <ul>
      <li data-md>
       <p>setting, disabling, skipping, and deleting breakpoints</p>
      <li data-md>
       <p>setting, disabling, skipping, and deleting watchpoints</p>
      <li data-md>
       <p>continue</p>
      <li data-md>
       <p>stepping over</p>
      <li data-md>
       <p>stepping into</p>
      <li data-md>
       <p>stepping out</p>
      <li data-md>
       <p>inspecting a variable’s contents</p>
      <li data-md>
       <p>TUI-mode, if a command-line debugger is being used</p>
     </ul>
    <li data-md>
     <p>navigate Compiler Explorer, including</p>
     <ul>
      <li data-md>
       <p>adding source files</p>
      <li data-md>
       <p>adding compilers</p>
      <li data-md>
       <p>use conformance mode</p>
      <li data-md>
       <p>use diff mode</p>
     </ul>
    <li data-md>
     <p>understand why using a code formatter is a 'best practice'</p>
    <li data-md>
     <p>understand why using a code linter is a 'best practice'</p>
   </ul>
   <h2 class="heading settled" data-level="4" id="acknowledgements"><span class="secno">4. </span><span class="content">Acknowledgements</span><a class="self-link" href="#acknowledgements"></a></h2>
   <p>I’d like to thank Gordon Brown, Bjarne Stroustrup, JC van Winkel, and Michael Wong for reviewing.</p>
   <h2 class="heading settled" id="appendix-a-resources-for-students"><span class="content">Appendix A: Resources for Students</span><a class="self-link" href="#appendix-a-resources-for-students"></a></h2>
   <h3 class="heading settled" id="programming----principles-and-practice-using-c"><span class="content">Programming -- Principles and Practice Using C++</span><a class="self-link" href="#programming----principles-and-practice-using-c"></a></h3>
   <ul>
    <li data-md>
     <p><b>Author</b>: Bjarne Stroustrup</p>
    <li data-md>
     <p><a href="http://stroustrup.com/programming.html">Webpage</a></p>
    <li data-md>
     <p><a href="http://stroustrup.com/Programming">Teacher notes and author advice</a></p>
   </ul>
   <h3 class="heading settled" id="a-tour-of-c"><span class="content">A Tour of C++</span><a class="self-link" href="#a-tour-of-c"></a></h3>
   <ul>
    <li data-md>
     <p><b>Author</b>: Bjarne Stroustrup</p>
    <li data-md>
     <p><a href="http://stroustrup.com/tour2.html">Webpage</a></p>
   </ul>
   <h3 class="heading settled" id="c-reference"><span class="content">C++ Reference</span><a class="self-link" href="#c-reference"></a></h3>
   <ul>
    <li data-md>
     <p><b>Short review</b>: C++ Reference is an wiki that is maintained by multiple C++ experts, many of
whom participate in the standardisation of C++. C++ Reference is a highly navigable reference,
with an online compiler so that examples can be experimented with.</p>
    <li data-md>
     <p><a href="https://en.cppreference.com/w/">Webpage</a></p>
   </ul>
   <h2 class="heading settled" id="appendix-b-resources-for-teachers"><span class="content">Appendix B: Resources for Teachers</span><a class="self-link" href="#appendix-b-resources-for-teachers"></a></h2>
   <h3 class="heading settled" id="stop-teaching-c"><span class="content">Stop Teaching C</span><a class="self-link" href="#stop-teaching-c"></a></h3>
   <ul>
    <li data-md>
     <p><b>Author</b>: Kate Gregory</p>
    <li data-md>
     <p><a href="https://youtu.be/YnWhqhNdYyk">Video</a></p>
   </ul>
   <h3 class="heading settled" id="how-to-teach-c-and-influence-a-generation"><span class="content">How to Teach C++ and Influence a Generation</span><a class="self-link" href="#how-to-teach-c-and-influence-a-generation"></a></h3>
   <ul>
    <li data-md>
     <p><b>Author</b>: Christopher Di Bella</p>
    <li data-md>
     <p><a href="https://youtu.be/3AkPd9Nt2Aw">Video</a></p>
   </ul>
   <h3 class="heading settled" id="the-design-and-evolution-of-c"><span class="content">The Design and Evolution of C++</span><a class="self-link" href="#the-design-and-evolution-of-c"></a></h3>
   <ul>
    <li data-md>
     <p><b>Author</b>: Bjarne Stroustrup</p>
    <li data-md>
     <p><a href="http://stroustrup.com/dne.html">Webpage</a></p>
   </ul>
   <h3 class="heading settled" id="history-of-programming-languages-ii"><span class="content">History of Programming Languages II</span><a class="self-link" href="#history-of-programming-languages-ii"></a></h3>
   <ul>
    <li data-md>
     <p><b>Author</b>: Bjarne Stroustrup</p>
    <li data-md>
     <p><a href="http://stroustrup.com/hopl2.pdf">Paper</a></p>
   </ul>
   <h3 class="heading settled" id="history-of-programming-languages-iii"><span class="content">History of Programming Languages III</span><a class="self-link" href="#history-of-programming-languages-iii"></a></h3>
   <ul>
    <li data-md>
     <p><b>Author</b>: Bjarne Stroustrup</p>
    <li data-md>
     <p><a href="http://stroustrup.com/hopl-almost-final.pdf">Paper</a></p>
   </ul>
   <h2 class="heading settled" id="appendix-c-glossary"><span class="content">Appendix C: Glossary</span><a class="self-link" href="#appendix-c-glossary"></a></h2>
   <ul>
    <li data-md>
     <p><b>Session</b>: A compilation of sessions. For a week-long C++ course, this would refer to the
entire course. In a single semester of university, it refers to the full semester. For a
textbook, a <a class="property" data-link-type="propdesc">session</a> refers to the book’s <a class="property" data-link-type="propdesc">edition</a>.</p>
    <li data-md>
     <p><b>Unit</b>: A unit of teaching. In a week-long C++ course, this might refer to hours or days.
In a single semester of university, it refers to one full week (includes lectures, tutorials,
and labs). In a textbook, a session is a single chapter. <i>Editor’s note: the term <b>unit</b> was previously known as <b>session</b>. This has now been changed.</i></p>
   </ul>
  </main>
<script>
(function() {
  "use strict";
  var collapseSidebarText = '<span aria-hidden="true">←</span> '
                          + '<span>Collapse Sidebar</span>';
  var expandSidebarText   = '<span aria-hidden="true">→</span> '
                          + '<span>Pop Out Sidebar</span>';
  var tocJumpText         = '<span aria-hidden="true">↑</span> '
                          + '<span>Jump to Table of Contents</span>';

  var sidebarMedia = window.matchMedia('screen and (min-width: 78em)');
  var autoToggle   = function(e){ toggleSidebar(e.matches) };
  if(sidebarMedia.addListener) {
    sidebarMedia.addListener(autoToggle);
  }

  function toggleSidebar(on) {
    if (on == undefined) {
      on = !document.body.classList.contains('toc-sidebar');
    }

    /* Don’t scroll to compensate for the ToC if we’re above it already. */
    var headY = 0;
    var head = document.querySelector('.head');
    if (head) {
      // terrible approx of "top of ToC"
      headY += head.offsetTop + head.offsetHeight;
    }
    var skipScroll = window.scrollY < headY;

    var toggle = document.getElementById('toc-toggle');
    var tocNav = document.getElementById('toc');
    if (on) {
      var tocHeight = tocNav.offsetHeight;
      document.body.classList.add('toc-sidebar');
      document.body.classList.remove('toc-inline');
      toggle.innerHTML = collapseSidebarText;
      if (!skipScroll) {
        window.scrollBy(0, 0 - tocHeight);
      }
      tocNav.focus();
      sidebarMedia.addListener(autoToggle); // auto-collapse when out of room
    }
    else {
      document.body.classList.add('toc-inline');
      document.body.classList.remove('toc-sidebar');
      toggle.innerHTML = expandSidebarText;
      if (!skipScroll) {
        window.scrollBy(0, tocNav.offsetHeight);
      }
      if (toggle.matches(':hover')) {
        /* Unfocus button when not using keyboard navigation,
           because I don’t know where else to send the focus. */
        toggle.blur();
      }
    }
  }

  function createSidebarToggle() {
    /* Create the sidebar toggle in JS; it shouldn’t exist when JS is off. */
    var toggle = document.createElement('a');
      /* This should probably be a button, but appearance isn’t standards-track.*/
    toggle.id = 'toc-toggle';
    toggle.class = 'toc-toggle';
    toggle.href = '#toc';
    toggle.innerHTML = collapseSidebarText;

    sidebarMedia.addListener(autoToggle);
    var toggler = function(e) {
      e.preventDefault();
      sidebarMedia.removeListener(autoToggle); // persist explicit off states
      toggleSidebar();
      return false;
    }
    toggle.addEventListener('click', toggler, false);


    /* Get <nav id=toc-nav>, or make it if we don’t have one. */
    var tocNav = document.getElementById('toc-nav');
    if (!tocNav) {
      tocNav = document.createElement('p');
      tocNav.id = 'toc-nav';
      /* Prepend for better keyboard navigation */
      document.body.insertBefore(tocNav, document.body.firstChild);
    }
    /* While we’re at it, make sure we have a Jump to Toc link. */
    var tocJump = document.getElementById('toc-jump');
    if (!tocJump) {
      tocJump = document.createElement('a');
      tocJump.id = 'toc-jump';
      tocJump.href = '#toc';
      tocJump.innerHTML = tocJumpText;
      tocNav.appendChild(tocJump);
    }

    tocNav.appendChild(toggle);
  }

  var toc = document.getElementById('toc');
  if (toc) {
    createSidebarToggle();
    toggleSidebar(sidebarMedia.matches);

    /* If the sidebar has been manually opened and is currently overlaying the text
       (window too small for the MQ to add the margin to body),
       then auto-close the sidebar once you click on something in there. */
    toc.addEventListener('click', function(e) {
      if(e.target.tagName.toLowerCase() == "a" && document.body.classList.contains('toc-sidebar') && !sidebarMedia.matches) {
        toggleSidebar(false);
      }
    }, false);
  }
  else {
    console.warn("Can’t find Table of Contents. Please use <nav id='toc'> around the ToC.");
  }

  /* Wrap tables in case they overflow */
  var tables = document.querySelectorAll(':not(.overlarge) > table.data, :not(.overlarge) > table.index');
  var numTables = tables.length;
  for (var i = 0; i < numTables; i++) {
    var table = tables[i];
    var wrapper = document.createElement('div');
    wrapper.className = 'overlarge';
    table.parentNode.insertBefore(wrapper, table);
    wrapper.appendChild(table);
  }

})();
</script>
  <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
  <h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3>
  <dl>
   <dt id="biblio-adobe">[ADOBE]
   <dd>Adobe, Inc.. <a href="https://github.com/adobe?utf8=%E2%9C%93&amp;q=&amp;type=&amp;language=c%2B%2B">GitHub for Adobe, Inc.</a>. URL: <a href="https://github.com/adobe?utf8=%E2%9C%93&amp;q=&amp;type=&amp;language=c%2B%2B">https://github.com/adobe?utf8=%E2%9C%93&amp;q=&amp;type=&amp;language=c%2B%2B</a>
   <dt id="biblio-applications">[APPLICATIONS]
   <dd>Bjarne Stroustrup. <a href="http://stroustrup.com/applications.html">C++ Applications</a>. URL: <a href="http://stroustrup.com/applications.html">http://stroustrup.com/applications.html</a>
   <dt id="biblio-bloomberg">[BLOOMBERG]
   <dd><a href="https://www.bloomberg.com/professional/blog/bloomberg-advancing-c-scale/">How Bloomberg is advancing C++ at scale</a>. 2016-08-23. URL: <a href="https://www.bloomberg.com/professional/blog/bloomberg-advancing-c-scale/">https://www.bloomberg.com/professional/blog/bloomberg-advancing-c-scale/</a>
   <dt id="biblio-codeplay">[CODEPLAY]
   <dd>Codeplay Software, Ltd.. <a href="https://codeplay.com/">Codeplay -- The Heterogeneous Systems Experts</a>. URL: <a href="https://codeplay.com/">https://codeplay.com/</a>
   <dt id="biblio-dne">[DNE]
   <dd>Bjarne Stroustrup. <a href="http://stroustrup.com/dne.html">The Design and Evolution of C++</a>. URL: <a href="http://stroustrup.com/dne.html">http://stroustrup.com/dne.html</a>
   <dt id="biblio-id4">[ID4]
   <dd>id Software. <a href="https://github.com/id-Software/DOOM-3-BFG">DOOM-3-BFG</a>. URL: <a href="https://github.com/id-Software/DOOM-3-BFG">https://github.com/id-Software/DOOM-3-BFG</a>
   <dt id="biblio-imc">[IMC]
   <dd>IMC Financial Markets. <a href="https://www.boost.org/community/imc_summer_of_code_2016.html">IMC Summer of Code 2016</a>. 2016. URL: <a href="https://www.boost.org/community/imc_summer_of_code_2016.html">https://www.boost.org/community/imc_summer_of_code_2016.html</a>
   <dt id="biblio-mentor">[MENTOR]
   <dd>Mentor Graphics. <a href="https://www.mentor.com/">Mentor</a>. URL: <a href="https://www.mentor.com/">https://www.mentor.com/</a>
   <dt id="biblio-p0798">[P0798]
   <dd>Simon Brand. <a href="https://wg21.link/p0798">Monadic operations for `std::optional`</a>. URL: <a href="https://wg21.link/p0798">https://wg21.link/p0798</a>
   <dt id="biblio-ppp">[PPP]
   <dd>Bjarne Stroustrup. <a href="http://stroustrup.com/programming.html">Programming -- Principles and Practice Using C++</a>. URL: <a href="http://stroustrup.com/programming.html">http://stroustrup.com/programming.html</a>
   <dt id="biblio-rcar">[RCAR]
   <dd>Renesas. <a href="https://www.renesas.com/eu/en/products/automotive/automotive-lsis/r-car.html">R-Car</a>. URL: <a href="https://www.renesas.com/eu/en/products/automotive/automotive-lsis/r-car.html">https://www.renesas.com/eu/en/products/automotive/automotive-lsis/r-car.html</a>
   <dt id="biblio-stop-teaching-c">[Stop-Teaching-C]
   <dd>Kate Gregory. <a href="https://youtu.be/YnWhqhNdYyk">CppCon 2015: Stop Teaching C</a>. URL: <a href="https://youtu.be/YnWhqhNdYyk">https://youtu.be/YnWhqhNdYyk</a>
   <dt id="biblio-win32">[WIN32]
   <dd>Ken Gregg. <a href="https://qr.ae/TUnniF">In which language is the Windows operating system written?</a>. URL: <a href="https://qr.ae/TUnniF">https://qr.ae/TUnniF</a>
  </dl>