CINXE.COM

C++11 - Wikipedia

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>C++11 - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy", "wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"106f1bcc-bd5a-44a6-b36a-6925a7f85cdf","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"C++11","wgTitle":"C++11","wgCurRevisionId":1247284989,"wgRevisionId":1247284989,"wgArticleId":5481447,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description matches Wikidata","Articles needing cleanup from March 2017","All pages needing cleanup","Wikipedia articles that are too technical from March 2017","All articles that are too technical","All articles with unsourced statements","Articles with unsourced statements from August 2013","Wikipedia articles needing clarification from September 2014","Wikipedia external links cleanup from October 2018","Webarchive template wayback links", "Articles with example C++ code","C++","Programming language standards","C++ programming language family","IEC standards","ISO standards"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"C++11","wgRelevantArticleId":5481447,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":100000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage", "wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q1061570","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"}; RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","site","mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=ext.cite.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="C++11 - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/C%2B%2B11"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=C%2B%2B11&amp;action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/C%2B%2B11"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-C_11 rootpage-C_11 skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page&#039;s font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&amp;returnto=C%2B%2B11" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&amp;returnto=C%2B%2B11" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&amp;returnto=C%2B%2B11" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&amp;returnto=C%2B%2B11" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-Design_goals" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Design_goals"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Design goals</span> </div> </a> <ul id="toc-Design_goals-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Extensions_to_the_C++_core_language" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Extensions_to_the_C++_core_language"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Extensions to the C++ core language</span> </div> </a> <button aria-controls="toc-Extensions_to_the_C++_core_language-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Extensions to the C++ core language subsection</span> </button> <ul id="toc-Extensions_to_the_C++_core_language-sublist" class="vector-toc-list"> <li id="toc-Core_language_runtime_performance_enhancements" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Core_language_runtime_performance_enhancements"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Core language runtime performance enhancements</span> </div> </a> <ul id="toc-Core_language_runtime_performance_enhancements-sublist" class="vector-toc-list"> <li id="toc-Rvalue_references_and_move_constructors" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Rvalue_references_and_move_constructors"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1.1</span> <span>Rvalue references and move constructors</span> </div> </a> <ul id="toc-Rvalue_references_and_move_constructors-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-constexpr_–_Generalized_constant_expressions" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#constexpr_–_Generalized_constant_expressions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1.2</span> <span>constexpr – Generalized constant expressions</span> </div> </a> <ul id="toc-constexpr_–_Generalized_constant_expressions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Modification_to_the_definition_of_plain_old_data" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Modification_to_the_definition_of_plain_old_data"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1.3</span> <span>Modification to the definition of plain old data</span> </div> </a> <ul id="toc-Modification_to_the_definition_of_plain_old_data-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Core_language_build-time_performance_enhancements" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Core_language_build-time_performance_enhancements"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Core language build-time performance enhancements</span> </div> </a> <ul id="toc-Core_language_build-time_performance_enhancements-sublist" class="vector-toc-list"> <li id="toc-Extern_template" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Extern_template"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2.1</span> <span>Extern template</span> </div> </a> <ul id="toc-Extern_template-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Core_language_usability_enhancements" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Core_language_usability_enhancements"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>Core language usability enhancements</span> </div> </a> <ul id="toc-Core_language_usability_enhancements-sublist" class="vector-toc-list"> <li id="toc-Initializer_lists" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Initializer_lists"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.1</span> <span>Initializer lists</span> </div> </a> <ul id="toc-Initializer_lists-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Uniform_initialization" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Uniform_initialization"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.2</span> <span>Uniform initialization</span> </div> </a> <ul id="toc-Uniform_initialization-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Type_inference" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Type_inference"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.3</span> <span>Type inference</span> </div> </a> <ul id="toc-Type_inference-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Range-based_for_loop" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Range-based_for_loop"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.4</span> <span>Range-based for loop</span> </div> </a> <ul id="toc-Range-based_for_loop-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Lambda_functions_and_expressions" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Lambda_functions_and_expressions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.5</span> <span>Lambda functions and expressions</span> </div> </a> <ul id="toc-Lambda_functions_and_expressions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Alternative_function_syntax" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Alternative_function_syntax"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.6</span> <span>Alternative function syntax</span> </div> </a> <ul id="toc-Alternative_function_syntax-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Object_construction_improvement" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Object_construction_improvement"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.7</span> <span>Object construction improvement</span> </div> </a> <ul id="toc-Object_construction_improvement-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Explicit_overrides_and_final" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Explicit_overrides_and_final"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.8</span> <span>Explicit overrides and final</span> </div> </a> <ul id="toc-Explicit_overrides_and_final-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Null_pointer_constant_and_type" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Null_pointer_constant_and_type"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.9</span> <span>Null pointer constant and type</span> </div> </a> <ul id="toc-Null_pointer_constant_and_type-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Strongly_typed_enumerations" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Strongly_typed_enumerations"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.10</span> <span>Strongly typed enumerations</span> </div> </a> <ul id="toc-Strongly_typed_enumerations-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Right_angle_bracket" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Right_angle_bracket"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.11</span> <span>Right angle bracket</span> </div> </a> <ul id="toc-Right_angle_bracket-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Explicit_conversion_operators" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Explicit_conversion_operators"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.12</span> <span>Explicit conversion operators</span> </div> </a> <ul id="toc-Explicit_conversion_operators-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Template_aliases" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Template_aliases"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.13</span> <span>Template aliases</span> </div> </a> <ul id="toc-Template_aliases-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Unrestricted_unions" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Unrestricted_unions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.14</span> <span>Unrestricted unions</span> </div> </a> <ul id="toc-Unrestricted_unions-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Core_language_functionality_improvements" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Core_language_functionality_improvements"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>Core language functionality improvements</span> </div> </a> <ul id="toc-Core_language_functionality_improvements-sublist" class="vector-toc-list"> <li id="toc-Variadic_templates" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Variadic_templates"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.1</span> <span>Variadic templates</span> </div> </a> <ul id="toc-Variadic_templates-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-New_string_literals" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#New_string_literals"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.2</span> <span>New string literals</span> </div> </a> <ul id="toc-New_string_literals-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-User-defined_literals" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#User-defined_literals"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.3</span> <span>User-defined literals</span> </div> </a> <ul id="toc-User-defined_literals-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Multithreading_memory_model" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Multithreading_memory_model"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.4</span> <span>Multithreading memory model</span> </div> </a> <ul id="toc-Multithreading_memory_model-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Thread-local_storage" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Thread-local_storage"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.5</span> <span>Thread-local storage</span> </div> </a> <ul id="toc-Thread-local_storage-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Explicitly_defaulted_special_member_functions" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Explicitly_defaulted_special_member_functions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.6</span> <span>Explicitly defaulted special member functions</span> </div> </a> <ul id="toc-Explicitly_defaulted_special_member_functions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Explicitly_deleted_functions" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Explicitly_deleted_functions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.7</span> <span>Explicitly deleted functions</span> </div> </a> <ul id="toc-Explicitly_deleted_functions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Type_long_long_int" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Type_long_long_int"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.8</span> <span>Type long long int</span> </div> </a> <ul id="toc-Type_long_long_int-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Static_assertions" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Static_assertions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.9</span> <span>Static assertions</span> </div> </a> <ul id="toc-Static_assertions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Allow_sizeof_to_work_on_members_of_classes_without_an_explicit_object" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Allow_sizeof_to_work_on_members_of_classes_without_an_explicit_object"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.10</span> <span>Allow sizeof to work on members of classes without an explicit object</span> </div> </a> <ul id="toc-Allow_sizeof_to_work_on_members_of_classes_without_an_explicit_object-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Control_and_query_object_alignment" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Control_and_query_object_alignment"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.11</span> <span>Control and query object alignment</span> </div> </a> <ul id="toc-Control_and_query_object_alignment-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Allow_garbage_collected_implementations" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Allow_garbage_collected_implementations"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.12</span> <span>Allow garbage collected implementations</span> </div> </a> <ul id="toc-Allow_garbage_collected_implementations-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Attributes" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Attributes"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.13</span> <span>Attributes</span> </div> </a> <ul id="toc-Attributes-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </li> <li id="toc-C++_standard_library_changes" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#C++_standard_library_changes"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>C++ standard library changes</span> </div> </a> <button aria-controls="toc-C++_standard_library_changes-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle C++ standard library changes subsection</span> </button> <ul id="toc-C++_standard_library_changes-sublist" class="vector-toc-list"> <li id="toc-Upgrades_to_standard_library_components" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Upgrades_to_standard_library_components"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.1</span> <span>Upgrades to standard library components</span> </div> </a> <ul id="toc-Upgrades_to_standard_library_components-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Threading_facilities" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Threading_facilities"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2</span> <span>Threading facilities</span> </div> </a> <ul id="toc-Threading_facilities-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Tuple_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Tuple_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3</span> <span>Tuple types</span> </div> </a> <ul id="toc-Tuple_types-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Hash_tables" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Hash_tables"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.4</span> <span>Hash tables</span> </div> </a> <ul id="toc-Hash_tables-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-std::array_and_std::forward_list" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#std::array_and_std::forward_list"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.5</span> <span>std::array and std::forward_list</span> </div> </a> <ul id="toc-std::array_and_std::forward_list-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Regular_expressions" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Regular_expressions"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.6</span> <span>Regular expressions</span> </div> </a> <ul id="toc-Regular_expressions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-General-purpose_smart_pointers" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#General-purpose_smart_pointers"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.7</span> <span>General-purpose smart pointers</span> </div> </a> <ul id="toc-General-purpose_smart_pointers-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Extensible_random_number_facility" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Extensible_random_number_facility"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.8</span> <span>Extensible random number facility</span> </div> </a> <ul id="toc-Extensible_random_number_facility-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Wrapper_reference" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Wrapper_reference"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.9</span> <span>Wrapper reference</span> </div> </a> <ul id="toc-Wrapper_reference-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Polymorphic_wrappers_for_function_objects" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Polymorphic_wrappers_for_function_objects"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.10</span> <span>Polymorphic wrappers for function objects</span> </div> </a> <ul id="toc-Polymorphic_wrappers_for_function_objects-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Type_traits_for_metaprogramming" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Type_traits_for_metaprogramming"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.11</span> <span>Type traits for metaprogramming</span> </div> </a> <ul id="toc-Type_traits_for_metaprogramming-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Uniform_method_for_computing_the_return_type_of_function_objects" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Uniform_method_for_computing_the_return_type_of_function_objects"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.12</span> <span>Uniform method for computing the return type of function objects</span> </div> </a> <ul id="toc-Uniform_method_for_computing_the_return_type_of_function_objects-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Improved_C_compatibility" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Improved_C_compatibility"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Improved C compatibility</span> </div> </a> <ul id="toc-Improved_C_compatibility-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Features_originally_planned_but_removed_or_not_included" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Features_originally_planned_but_removed_or_not_included"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Features originally planned but removed or not included</span> </div> </a> <ul id="toc-Features_originally_planned_but_removed_or_not_included-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Features_removed_or_deprecated" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Features_removed_or_deprecated"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Features removed or deprecated</span> </div> </a> <ul id="toc-Features_removed_or_deprecated-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-External_links" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#External_links"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>External links</span> </div> </a> <ul id="toc-External_links-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">C++11</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 22 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-22" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">22 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%B3%D9%8A%2B%2B11" title="سي++11 – Arabic" lang="ar" hreflang="ar" data-title="سي++11" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Catalan" lang="ca" hreflang="ca" data-title="C++11" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Czech" lang="cs" hreflang="cs" data-title="C++11" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-de badge-Q70894304 mw-list-item" title=""><a href="https://de.wikipedia.org/wiki/C%2B%2B11" title="C++11 – German" lang="de" hreflang="de" data-title="C++11" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Spanish" lang="es" hreflang="es" data-title="C++11" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%B3%DB%8C%E2%80%8C%D9%BE%D9%84%D8%A7%D8%B3%E2%80%8C%D9%BE%D9%84%D8%A7%D8%B3_%DB%B1%DB%B1" title="سی‌پلاس‌پلاس ۱۱ – Persian" lang="fa" hreflang="fa" data-title="سی‌پلاس‌پلاس ۱۱" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/C%2B%2B11" title="C++11 – French" lang="fr" hreflang="fr" data-title="C++11" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Korean" lang="ko" hreflang="ko" data-title="C++11" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-hy mw-list-item"><a href="https://hy.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Armenian" lang="hy" hreflang="hy" data-title="C++11" data-language-autonym="Հայերեն" data-language-local-name="Armenian" class="interlanguage-link-target"><span>Հայերեն</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Italian" lang="it" hreflang="it" data-title="C++11" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Japanese" lang="ja" hreflang="ja" data-title="C++11" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Norwegian Bokmål" lang="nb" hreflang="nb" data-title="C++11" data-language-autonym="Norsk bokmål" data-language-local-name="Norwegian Bokmål" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Polish" lang="pl" hreflang="pl" data-title="C++11" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Portuguese" lang="pt" hreflang="pt" data-title="C++11" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Russian" lang="ru" hreflang="ru" data-title="C++11" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/%D0%9D%D0%B0%D1%86%D1%80%D1%82_C%2B%2B0x_%D0%BE%D0%B4_%D0%BC%D0%B0%D1%80%D1%82%D0%B0_2010." title="Нацрт C++0x од марта 2010. – Serbian" lang="sr" hreflang="sr" data-title="Нацрт C++0x од марта 2010." data-language-autonym="Српски / srpski" data-language-local-name="Serbian" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Finnish" lang="fi" hreflang="fi" data-title="C++11" data-language-autonym="Suomi" data-language-local-name="Finnish" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/C%2B%2B#Historia" title="C++ – Swedish" lang="sv" hreflang="sv" data-title="C++" data-language-autonym="Svenska" data-language-local-name="Swedish" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B2%E0%B8%8B%E0%B8%B5%E0%B8%9E%E0%B8%A5%E0%B8%B1%E0%B8%AA%E0%B8%9E%E0%B8%A5%E0%B8%B1%E0%B8%AA11" title="ภาษาซีพลัสพลัส11 – Thai" lang="th" hreflang="th" data-title="ภาษาซีพลัสพลัส11" data-language-autonym="ไทย" data-language-local-name="Thai" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Ukrainian" lang="uk" hreflang="uk" data-title="C++11" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Vietnamese" lang="vi" hreflang="vi" data-title="C++11" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/C%2B%2B11" title="C++11 – Chinese" lang="zh" hreflang="zh" data-title="C++11" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q1061570#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/C%2B%2B11" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:C%2B%2B11" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/C%2B%2B11"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=C%2B%2B11&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=C%2B%2B11&amp;action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/C%2B%2B11"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=C%2B%2B11&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=C%2B%2B11&amp;action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/C%2B%2B11" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/C%2B%2B11" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=C%2B%2B11&amp;oldid=1247284989" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=C%2B%2B11&amp;action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&amp;page=C%2B%2B11&amp;id=1247284989&amp;wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FC%252B%252B11"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FC%252B%252B11"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&amp;page=C%2B%2B11&amp;action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=C%2B%2B11&amp;printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q1061570" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">2011 edition of the C++ programming language standard</div> <style data-mw-deduplicate="TemplateStyles:r1236090951">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable">Not to be confused with <a href="/wiki/C11_(C_standard_revision)" title="C11 (C standard revision)">C11 (C standard revision)</a>.</div> <style data-mw-deduplicate="TemplateStyles:r1251242444">.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}</style><table class="box-Condense plainlinks metadata ambox ambox-style ambox-condense" role="presentation"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/f/f2/Edit-clear.svg/40px-Edit-clear.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/f/f2/Edit-clear.svg/60px-Edit-clear.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/f/f2/Edit-clear.svg/80px-Edit-clear.svg.png 2x" data-file-width="48" data-file-height="48" /></span></span></div></td><td class="mbox-text"><div class="mbox-text-span">This article <b>may have <a href="/wiki/Wikipedia:Manual_of_Style/Layout#Headings_and_sections" title="Wikipedia:Manual of Style/Layout">too many section headers</a></b>.<span class="hide-when-compact"> Please help consolidate the article.</span> <span class="date-container"><i>(<span class="date">March 2017</span>)</i></span><span class="hide-when-compact"><i> (<small><a href="/wiki/Help:Maintenance_template_removal" title="Help:Maintenance template removal">Learn how and when to remove this message</a></small>)</i></span></div></td></tr></tbody></table> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1251242444"><table class="box-Technical plainlinks metadata ambox ambox-style ambox-technical" role="presentation"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/f/f2/Edit-clear.svg/40px-Edit-clear.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/f/f2/Edit-clear.svg/60px-Edit-clear.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/f/f2/Edit-clear.svg/80px-Edit-clear.svg.png 2x" data-file-width="48" data-file-height="48" /></span></span></div></td><td class="mbox-text"><div class="mbox-text-span">This article <b>may be too technical for most readers to understand</b>.<span class="hide-when-compact"> Please <a class="external text" href="https://en.wikipedia.org/w/index.php?title=C%2B%2B11&amp;action=edit">help improve it</a> to <a href="/wiki/Wikipedia:Make_technical_articles_understandable" title="Wikipedia:Make technical articles understandable">make it understandable to non-experts</a>, without removing the technical details.</span> <span class="date-container"><i>(<span class="date">March 2017</span>)</i></span><span class="hide-when-compact"><i> (<small><a href="/wiki/Help:Maintenance_template_removal" title="Help:Maintenance template removal">Learn how and when to remove this message</a></small>)</i></span></div></td></tr></tbody></table> <style data-mw-deduplicate="TemplateStyles:r1129693374">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}</style><style data-mw-deduplicate="TemplateStyles:r1246091330">.mw-parser-output .sidebar{width:22em;float:right;clear:right;margin:0.5em 0 1em 1em;background:var(--background-color-neutral-subtle,#f8f9fa);border:1px solid var(--border-color-base,#a2a9b1);padding:0.2em;text-align:center;line-height:1.4em;font-size:88%;border-collapse:collapse;display:table}body.skin-minerva .mw-parser-output .sidebar{display:table!important;float:right!important;margin:0.5em 0 1em 1em!important}.mw-parser-output .sidebar-subgroup{width:100%;margin:0;border-spacing:0}.mw-parser-output .sidebar-left{float:left;clear:left;margin:0.5em 1em 1em 0}.mw-parser-output .sidebar-none{float:none;clear:both;margin:0.5em 1em 1em 0}.mw-parser-output .sidebar-outer-title{padding:0 0.4em 0.2em;font-size:125%;line-height:1.2em;font-weight:bold}.mw-parser-output .sidebar-top-image{padding:0.4em}.mw-parser-output .sidebar-top-caption,.mw-parser-output .sidebar-pretitle-with-top-image,.mw-parser-output .sidebar-caption{padding:0.2em 0.4em 0;line-height:1.2em}.mw-parser-output .sidebar-pretitle{padding:0.4em 0.4em 0;line-height:1.2em}.mw-parser-output .sidebar-title,.mw-parser-output .sidebar-title-with-pretitle{padding:0.2em 0.8em;font-size:145%;line-height:1.2em}.mw-parser-output .sidebar-title-with-pretitle{padding:0.1em 0.4em}.mw-parser-output .sidebar-image{padding:0.2em 0.4em 0.4em}.mw-parser-output .sidebar-heading{padding:0.1em 0.4em}.mw-parser-output .sidebar-content{padding:0 0.5em 0.4em}.mw-parser-output .sidebar-content-with-subgroup{padding:0.1em 0.4em 0.2em}.mw-parser-output .sidebar-above,.mw-parser-output .sidebar-below{padding:0.3em 0.8em;font-weight:bold}.mw-parser-output .sidebar-collapse .sidebar-above,.mw-parser-output .sidebar-collapse .sidebar-below{border-top:1px solid #aaa;border-bottom:1px solid #aaa}.mw-parser-output .sidebar-navbar{text-align:right;font-size:115%;padding:0 0.4em 0.4em}.mw-parser-output .sidebar-list-title{padding:0 0.4em;text-align:left;font-weight:bold;line-height:1.6em;font-size:105%}.mw-parser-output .sidebar-list-title-c{padding:0 0.4em;text-align:center;margin:0 3.3em}@media(max-width:640px){body.mediawiki .mw-parser-output .sidebar{width:100%!important;clear:both;float:none!important;margin-left:0!important;margin-right:0!important}}body.skin--responsive .mw-parser-output .sidebar a>img{max-width:none!important}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-list-title,html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle{background:transparent!important}html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle a{color:var(--color-progressive)!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-list-title,html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle{background:transparent!important}html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle a{color:var(--color-progressive)!important}}@media print{body.ns-0 .mw-parser-output .sidebar{display:none!important}}</style><table class="sidebar nomobile nowraplinks"><tbody><tr><th class="sidebar-title"><a href="/wiki/C%2B%2B#Standardization" title="C++">C++ language revisions</a></th></tr><tr><td class="sidebar-content hlist"> <ul><li><a href="/wiki/C%2B%2B98" class="mw-redirect" title="C++98">C++98</a></li> <li><a href="/wiki/C%2B%2B03" title="C++03">C++03</a></li> <li><a class="mw-selflink selflink">C++11</a></li> <li><a href="/wiki/C%2B%2B14" title="C++14">C++14</a></li> <li><a href="/wiki/C%2B%2B17" title="C++17">C++17</a></li> <li><a href="/wiki/C%2B%2B20" title="C++20">C++20</a></li> <li><a href="/wiki/C%2B%2B23" title="C++23">C++23</a></li> <li><a href="/wiki/C%2B%2B26" title="C++26">C++26</a></li></ul></td> </tr><tr><td class="sidebar-navbar"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><style data-mw-deduplicate="TemplateStyles:r1239400231">.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}</style><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:C%2B%2B_language_revisions" title="Template:C++ language revisions"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:C%2B%2B_language_revisions" title="Template talk:C++ language revisions"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:C%2B%2B_language_revisions" title="Special:EditPage/Template:C++ language revisions"><abbr title="Edit this template">e</abbr></a></li></ul></div></td></tr></tbody></table> <p><b>C++11</b> is a version of a joint <a href="/wiki/Technical_standard" title="Technical standard">technical standard</a>, ISO/IEC 14882, by the <a href="/wiki/International_Organization_for_Standardization" title="International Organization for Standardization">International Organization for Standardization</a> (ISO) and <a href="/wiki/International_Electrotechnical_Commission" title="International Electrotechnical Commission">International Electrotechnical Commission</a> (IEC), for the <a href="/wiki/C%2B%2B" title="C++">C++</a> programming language. C++11 replaced the prior version of the C++ standard, named <a href="/wiki/C%2B%2B03" title="C++03">C++03</a>,<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">&#91;</span>1<span class="cite-bracket">&#93;</span></a></sup> and was later replaced by <a href="/wiki/C%2B%2B14" title="C++14">C++14</a>. The name follows the tradition of naming language versions by the publication year of the specification, though it was formerly named <i>C++0x</i> because it was expected to be published before 2010.<sup id="cite_ref-:0_2-0" class="reference"><a href="#cite_note-:0-2"><span class="cite-bracket">&#91;</span>2<span class="cite-bracket">&#93;</span></a></sup> </p><p>Although one of the design goals was to prefer changes to the libraries over changes to the <a href="/wiki/Core_language" class="mw-redirect" title="Core language">core language</a>,<sup id="cite_ref-:1_3-0" class="reference"><a href="#cite_note-:1-3"><span class="cite-bracket">&#91;</span>3<span class="cite-bracket">&#93;</span></a></sup> C++11 does make several additions to the core language. Areas of the core language that were significantly improved include multithreading support, <a href="/wiki/Generic_programming" title="Generic programming">generic programming</a> support, uniform initialization, and performance. Significant changes were also made to the <a href="/wiki/C%2B%2B_Standard_Library" title="C++ Standard Library">C++ Standard Library</a>, incorporating most of the <a href="/wiki/C%2B%2B_Technical_Report_1" title="C++ Technical Report 1">C++ Technical Report 1</a> (TR1) <a href="/wiki/Library_(computer_science)" class="mw-redirect" title="Library (computer science)">libraries</a>, except the library of mathematical special functions.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">&#91;</span>4<span class="cite-bracket">&#93;</span></a></sup> </p><p>C++11 was published as <i>ISO/IEC 14882:2011</i><sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">&#91;</span>5<span class="cite-bracket">&#93;</span></a></sup> in September 2011 and is available for a fee. The working draft most similar to the published C++11 standard is N3337, dated 16 January 2012;<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup> it has only editorial corrections from the C++11 standard.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">&#91;</span>7<span class="cite-bracket">&#93;</span></a></sup> </p><p>C++11 is fully supported by <a href="/wiki/Clang" title="Clang">Clang</a> 3.3 and later.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">&#91;</span>8<span class="cite-bracket">&#93;</span></a></sup> C++11 is fully supported by <a href="/wiki/GNU_Compiler_Collection" title="GNU Compiler Collection">GNU Compiler Collection</a> (GCC) 4.8.1 and later.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup> </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Design_goals">Design goals</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=1" title="Edit section: Design goals"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The design committee attempted to stick to a number of goals in designing C++11: </p> <ul><li>Maintain stability and compatibility with older code</li> <li>Prefer introducing new features via the standard library, rather than extending the core language</li> <li>Improve C++ to facilitate systems and library design, rather than introduce new features useful only to specific applications</li> <li>Increase type safety by providing safer alternatives to earlier unsafe techniques</li> <li>Increase performance and the ability to work directly with hardware</li> <li>Provide proper solutions for real-world problems</li> <li>Make C++ easy to teach and to learn without removing any utility needed by expert programmers</li></ul> <p>Attention to beginners is considered important, because most computer programmers will always be such, and because many beginners never widen their knowledge, limiting themselves to work in aspects of the language in which they specialize.<sup id="cite_ref-:0_2-1" class="reference"><a href="#cite_note-:0-2"><span class="cite-bracket">&#91;</span>2<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-:1_3-1" class="reference"><a href="#cite_note-:1-3"><span class="cite-bracket">&#91;</span>3<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Extensions_to_the_C++_core_language"><span id="Extensions_to_the_C.2B.2B_core_language"></span>Extensions to the C++ core language</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=2" title="Edit section: Extensions to the C++ core language"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>One function of the C++ committee is the development of the language core. Areas of the core language that were significantly improved include <a href="/wiki/Thread_(computer_science)" class="mw-redirect" title="Thread (computer science)">multithreading</a> support, <a href="/wiki/Generic_programming" title="Generic programming">generic programming</a> support, uniform initialization, and performance. </p> <div class="mw-heading mw-heading3"><h3 id="Core_language_runtime_performance_enhancements">Core language runtime performance enhancements</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=3" title="Edit section: Core language runtime performance enhancements"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>These language features primarily exist to provide some kind of <a href="/wiki/Execution_(computing)#Runtime" title="Execution (computing)">runtime</a> performance benefit, either of memory or of computing speed.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (August 2013)">citation needed</span></a></i>&#93;</sup> </p> <div class="mw-heading mw-heading4"><h4 id="Rvalue_references_and_move_constructors">Rvalue references and move constructors</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=4" title="Edit section: Rvalue references and move constructors"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In C++03 (and before), temporaries (termed "<a href="/wiki/Value_(computer_science)" title="Value (computer science)">rvalues</a>", as they often lie on the right side of an assignment) were intended to never be modifiable — just as in C — and were considered to be indistinguishable from <code>const T&amp;</code> types; nevertheless, in some cases, temporaries could have been modified, a behavior that was even considered to be a useful loophole.<sup id="cite_ref-Sutter_Alexandrescu_10-0" class="reference"><a href="#cite_note-Sutter_Alexandrescu-10"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup> C++11 adds a new non-const <a href="/wiki/Reference_type_(C%2B%2B)" class="mw-redirect" title="Reference type (C++)">reference type</a> called an <style data-mw-deduplicate="TemplateStyles:r1238216509">.mw-parser-output .vanchor>:target~.vanchor-text{background-color:#b1d2ff}@media screen{html.skin-theme-clientpref-night .mw-parser-output .vanchor>:target~.vanchor-text{background-color:#0f4dc9}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .vanchor>:target~.vanchor-text{background-color:#0f4dc9}}</style><span class="vanchor"><span id="rvalue_reference"></span><span class="vanchor-text">rvalue reference</span></span>, identified by <code>T&amp;&amp;</code>. This refers to temporaries that are permitted to be modified after they are initialized, for the purpose of allowing "move semantics". </p><p>A chronic performance problem with C++03 is the costly and unneeded <a href="/wiki/Deep_copy" class="mw-redirect" title="Deep copy">deep copies</a> that can happen implicitly when objects are passed by value. To illustrate the issue, consider that an <code>std::vector&lt;T&gt;</code> is, internally, a wrapper around a C-style array with a defined size. If an <code>std::vector&lt;T&gt;</code> temporary is created or returned from a function, it can be stored only by creating a new <code>std::vector&lt;T&gt;</code> and copying all the rvalue's data into it. Then the temporary and all its memory is destroyed. (For simplicity, this discussion neglects the <a href="/wiki/Return_value_optimization" class="mw-redirect" title="Return value optimization">return value optimization</a>.) </p><p>In C++11, a <a href="https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Move_Constructor" class="extiw" title="b:More C++ Idioms/Move Constructor"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238216509"><span class="vanchor"><span id="move_constructor"></span><span class="vanchor-text">move constructor</span></span></a> of <code>std::vector&lt;T&gt;</code> that takes an rvalue reference to an <code>std::vector&lt;T&gt;</code> can copy the pointer to the internal C-style array out of the rvalue into the new <code>std::vector&lt;T&gt;</code>, then set the pointer inside the rvalue to null. Since the temporary will never again be used, no code will try to access the null pointer, and because the pointer is null, its memory is not deleted when it goes out of scope. Hence, the operation not only forgoes the expense of a deep copy, but is safe and invisible. </p><p>Rvalue references can provide performance benefits to existing code without needing to make any changes outside the standard library. The type of the returned value of a function returning an <code>std::vector&lt;T&gt;</code> temporary does not need to be changed explicitly to <code>std::vector&lt;T&gt; &amp;&amp;</code> to invoke the move constructor, as temporaries are considered rvalues automatically. (However, if <code>std::vector&lt;T&gt;</code> is a C++03 version without a move constructor, then the copy constructor will be invoked with a <code>const std::vector&lt;T&gt;&amp;</code>, incurring a significant memory allocation.) </p><p>For safety reasons, some restrictions are imposed. A named variable will never be considered to be an rvalue even if it is declared as such. To get an rvalue, the function template <code>std::move()</code> should be used. Rvalue references can also be modified only under certain circumstances, being intended to be used primarily with move constructors. </p><p>Due to the nature of the wording of rvalue references, and to some modification to the wording for lvalue references (regular references), rvalue references allow developers to provide perfect function forwarding. When combined with <a href="#Variadic_templates">variadic templates</a>, this ability allows for function templates that can perfectly forward arguments to another function that takes those particular arguments. This is most useful for forwarding constructor parameters, to create factory functions that will automatically call the correct constructor for those particular arguments. This is seen in the <a rel="nofollow" class="external text" href="http://en.cppreference.com/w/cpp/container/vector/emplace_back">emplace_back</a> set of the C++ standard library methods. </p> <div class="mw-heading mw-heading4"><h4 id="constexpr_–_Generalized_constant_expressions"><span id="constexpr_.E2.80.93_Generalized_constant_expressions"></span>constexpr – Generalized constant expressions</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=5" title="Edit section: constexpr – Generalized constant expressions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>C++ has always had the concept of constant expressions. These are expressions such as <code>3+4</code> that will always yield the same results, at compile time and at runtime. Constant expressions are optimization opportunities for compilers, and compilers frequently <a href="/wiki/Compile-time_function_execution" title="Compile-time function execution">execute them at compile time</a> and hardcode the results in the program. Also, in several places, the C++ specification requires using constant expressions. Defining an array requires a constant expression, and enumerator values must be constant expressions. </p><p>However, a constant expression has never been allowed to contain a function call or object constructor. So a piece of code as simple as this is invalid: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="kt">int</span><span class="w"> </span><span class="nf">get_five</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="k">return</span><span class="w"> </span><span class="mi">5</span><span class="p">;}</span> <span class="kt">int</span><span class="w"> </span><span class="n">some_value</span><span class="p">[</span><span class="n">get_five</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">7</span><span class="p">];</span><span class="w"> </span><span class="c1">// Create an array of 12 integers. Ill-formed C++</span> </pre></div> <p>This was not valid in C++03, because <code>get_five() + 7</code> is not a constant expression. A C++03 compiler has no way of knowing if <code>get_five()</code> actually is constant at runtime. In theory, this function could affect a global variable, call other non-runtime constant functions, etc. </p><p>C++11 introduced the keyword <code>constexpr</code>, which allows the user to guarantee that a function or object constructor is a compile-time constant.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> The above example can be rewritten as follows: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">constexpr</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="nf">get_five</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="k">return</span><span class="w"> </span><span class="mi">5</span><span class="p">;}</span> <span class="kt">int</span><span class="w"> </span><span class="n">some_value</span><span class="p">[</span><span class="n">get_five</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">7</span><span class="p">];</span><span class="w"> </span><span class="c1">// Create an array of 12 integers. Valid C++11</span> </pre></div> <p>This allows the compiler to understand, and verify, that <code>get_five()</code> is a compile-time constant. </p><p>Using <code>constexpr</code> on a function imposes some limits on what that function can do. First, the function must have a non-void return type. Second, the function body cannot declare variables or define new types. Third, the body may contain only declarations, null statements and a single return statement. There must exist argument values such that, after argument substitution, the expression in the return statement produces a constant expression. </p><p>Before C++11, the values of variables could be used in constant expressions only if the variables are declared const, have an initializer which is a constant expression, and are of integral or enumeration type. C++11 removes the restriction that the variables must be of integral or enumeration type if they are defined with the <code>constexpr</code> keyword: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">constexpr</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">earth_gravitational_acceleration</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">9.8</span><span class="p">;</span> <span class="k">constexpr</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">moon_gravitational_acceleration</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">earth_gravitational_acceleration</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mf">6.0</span><span class="p">;</span> </pre></div> <p>Such data variables are implicitly const, and must have an initializer which must be a constant expression. </p><p>To construct constant expression data values from user-defined types, constructors can also be declared with <code>constexpr</code>. A <code>constexpr</code> constructor's function body can contain only declarations and null statements, and cannot declare variables or define types, as with a <code>constexpr</code> function. There must exist argument values such that, after argument substitution, it initializes the class's members with constant expressions. The destructors for such types must be trivial. </p><p>The copy constructor for a type with any <code>constexpr</code> constructors should usually also be defined as a <code>constexpr</code> constructor, to allow objects of the type to be returned by value from a constexpr function. Any member function of a class, such as copy constructors, operator overloads, etc., can be declared as <code>constexpr</code>, so long as they meet the requirements for constexpr functions. This allows the compiler to copy objects at compile time, perform operations on them, etc. </p><p>If a constexpr function or constructor is called with arguments which aren't constant expressions, the call behaves as if the function were not constexpr, and the resulting value is not a constant expression. Likewise, if the expression in the return statement of a constexpr function does not evaluate to a constant expression for a given invocation, the result is not a constant expression. </p><p><code>constexpr</code> differs from <code>consteval</code>, introduced in <a href="/wiki/C%2B%2B20" title="C++20">C++20</a>, in that the latter must always produce a compile time constant, while <code>constexpr</code> does not have this restriction. </p> <div class="mw-heading mw-heading4"><h4 id="Modification_to_the_definition_of_plain_old_data">Modification to the definition of plain old data</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=6" title="Edit section: Modification to the definition of plain old data"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In C++03, a class or struct must follow a number of rules for it to be considered a <a href="/wiki/Plain_old_data" class="mw-redirect" title="Plain old data">plain old data</a> (POD) type. Types that fit this definition produce object layouts that are compatible with C, and they could also be initialized statically. The C++03 standard has restrictions on what types are compatible with C or can be statically initialized despite there being no technical reason a compiler couldn't accept the program; if someone were to create a C++03 POD type and add a non-virtual member function, this type would no longer be a POD type, could not be statically initialized, and would be incompatible with C despite no change to the memory layout. </p><p>C++11 relaxed several of the POD rules, by dividing the POD concept into two separate concepts: <i>trivial</i> and <i>standard-layout</i>. </p><p>A type that is <i>trivial</i> can be statically initialized. It also means that it is valid to copy data around via <code>memcpy</code>, rather than having to use a copy constructor. The lifetime of a <i>trivial</i> type begins when its storage is defined, not when a constructor completes. </p><p>A trivial class or struct is defined as one that: </p> <ol><li>Has a trivial default constructor. This may use the <a href="#Explicitly_defaulted_special_member_functions">default constructor syntax</a> (<code>SomeConstructor() = default;</code>).</li> <li>Has trivial copy and move constructors, which may use the default syntax.</li> <li>Has trivial copy and move assignment operators, which may use the default syntax.</li> <li>Has a trivial destructor, which must not be virtual.</li></ol> <p>Constructors are trivial only if there are no virtual member functions of the class and no virtual base classes. Copy/move operations also require all non-static data members to be trivial. </p><p>A type that is <i>standard-layout</i> means that it orders and packs its members in a way that is compatible with C. A class or struct is standard-layout, by definition, provided: </p> <ol><li>It has no <a href="/wiki/Virtual_function" title="Virtual function">virtual functions</a></li> <li>It has no virtual base classes</li> <li>All its non-static data members have the same access control (public, private, protected)</li> <li>All its non-static data members, including any in its base classes, are in the same one class in the hierarchy</li> <li>The above rules also apply to all the base classes and to all non-static data members in the class hierarchy</li> <li>It has no base classes of the same type as the first defined non-static data member</li></ol> <p>A class/struct/union is considered POD if it is trivial, standard-layout, and all of its non-static data members and base classes are PODs. </p><p>By separating these concepts, it becomes possible to give up one without losing the other. A class with complex move and copy constructors may not be trivial, but it could be standard-layout and thus interoperate with C. Similarly, a class with public and private non-static data members would not be standard-layout, but it could be trivial and thus <code>memcpy</code>-able. </p> <div class="mw-heading mw-heading3"><h3 id="Core_language_build-time_performance_enhancements">Core language build-time performance enhancements</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=7" title="Edit section: Core language build-time performance enhancements"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading4"><h4 id="Extern_template">Extern template</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=8" title="Edit section: Extern template"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In C++03, the compiler must instantiate a template whenever a fully specified template is encountered in a translation unit. If the template is instantiated with the same types in many translation units, this can dramatically increase compile times. There is no way to prevent this in C++03, so C++11 introduced extern template declarations, analogous to extern data declarations. </p><p>C++03 has this syntax to oblige the compiler to instantiate a template: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">template</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">MyClass</span><span class="o">&gt;</span><span class="p">;</span> </pre></div> <p>C++11 now provides this syntax: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">extern</span><span class="w"> </span><span class="k">template</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">MyClass</span><span class="o">&gt;</span><span class="p">;</span> </pre></div> <p>which tells the compiler <i>not</i> to instantiate the template in this translation unit. </p> <div class="mw-heading mw-heading3"><h3 id="Core_language_usability_enhancements">Core language usability enhancements</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=9" title="Edit section: Core language usability enhancements"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>These features exist for the primary purpose of making the language easier to use. These can improve type safety, minimize code repetition, make erroneous code less likely, etc. </p> <div class="mw-heading mw-heading4"><h4 id="Initializer_lists">Initializer lists</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=10" title="Edit section: Initializer lists"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>C++03 inherited the initializer-list feature from C. A struct or array is given a list of arguments in braces, in the order of the members' definitions in the struct. These initializer-lists are recursive, so an array of structs or struct containing other structs can use them. </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">Object</span> <span class="p">{</span> <span class="w"> </span><span class="kt">float</span><span class="w"> </span><span class="n">first</span><span class="p">;</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">second</span><span class="p">;</span> <span class="p">};</span> <span class="n">Object</span><span class="w"> </span><span class="n">scalar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mf">0.43f</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">};</span><span class="w"> </span><span class="c1">//One Object, with first=0.43f and second=10</span> <span class="n">Object</span><span class="w"> </span><span class="n">anArray</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{{</span><span class="mf">13.4f</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mf">43.28f</span><span class="p">,</span><span class="w"> </span><span class="mi">29</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mf">5.934f</span><span class="p">,</span><span class="w"> </span><span class="mi">17</span><span class="p">}};</span><span class="w"> </span><span class="c1">//An array of three Objects</span> </pre></div> <p>This is very useful for static lists, or initializing a struct to some value. C++ also provides constructors to initialize an object, but they are often not as convenient as the initializer list. However, C++03 allows initializer-lists only on structs and classes that conform to the Plain Old Data (POD) definition; C++11 extends initializer-lists, so they can be used for all classes including standard containers like <code>std::vector</code>. </p><p>C++11 binds the concept to a template, called <code>std::initializer_list</code>. This allows constructors and other functions to take initializer-lists as parameters. For example: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">class</span><span class="w"> </span><span class="nc">SequenceClass</span> <span class="p">{</span> <span class="k">public</span><span class="o">:</span> <span class="w"> </span><span class="n">SequenceClass</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">initializer_list</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="w"> </span><span class="n">list</span><span class="p">);</span> <span class="p">};</span> </pre></div> <p>This allows <code>SequenceClass</code> to be constructed from a sequence of integers, such as: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="n">SequenceClass</span><span class="w"> </span><span class="n">some_var</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">};</span> </pre></div> <p>This constructor is a special kind of constructor, called an initializer-list-constructor. Classes with such a constructor are treated specially during uniform initialization (see <a href="#Uniform_initialization">below</a>) </p><p>The template class <code>std::initializer_list&lt;&gt;</code> is a <a href="/wiki/First-class_citizen" title="First-class citizen">first-class</a> C++11 standard library type. They can be constructed statically by the C++11 compiler via use of the <code>{}</code> syntax without a type name in contexts where such braces will deduce to an <code>std::initializer_list</code>, or by explicitly specifying the type like <code>std::initializer_list&lt;SomeType&gt;{args}</code> (and so on for other varieties of construction syntax). </p><p>The list can be copied once constructed, which is cheap and will act as a copy-by-reference (the class is typically implemented as a pair of begin/end pointers). An <code>std::initializer_list</code> is constant: its members cannot be changed once it is created, and nor can the data in those members be changed (which rules out moving from them, requiring copies into class members, etc.). </p><p>Although its construction is specially treated by the compiler, an <code>std::initializer_list</code> is a real type, and so it can be used in other places besides class constructors. Regular functions can take typed <code>std::initializer_list</code>s as arguments. For example: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="kt">void</span><span class="w"> </span><span class="nf">function_name</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">initializer_list</span><span class="o">&lt;</span><span class="kt">float</span><span class="o">&gt;</span><span class="w"> </span><span class="n">list</span><span class="p">);</span><span class="w"> </span><span class="c1">// Copying is cheap; see above</span> <span class="n">function_name</span><span class="p">({</span><span class="mf">1.0f</span><span class="p">,</span><span class="w"> </span><span class="mf">-3.45f</span><span class="p">,</span><span class="w"> </span><span class="mf">-0.4f</span><span class="p">});</span> </pre></div> <p>Examples of this in the standard library include the <code>std::min()</code> and <code>std::max()</code> templates taking <code>std::initializer_list</code>s of numeric type. </p><p>Standard containers can also be initialized in these ways: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span><span class="w"> </span><span class="n">v</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">&quot;xyzzy&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;plugh&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;abracadabra&quot;</span><span class="w"> </span><span class="p">};</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span><span class="w"> </span><span class="n">v</span><span class="p">({</span><span class="w"> </span><span class="s">&quot;xyzzy&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;plugh&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;abracadabra&quot;</span><span class="w"> </span><span class="p">});</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span><span class="w"> </span><span class="n">v</span><span class="p">{</span><span class="w"> </span><span class="s">&quot;xyzzy&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;plugh&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;abracadabra&quot;</span><span class="w"> </span><span class="p">};</span><span class="w"> </span><span class="c1">// see &quot;Uniform initialization&quot; below</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Uniform_initialization">Uniform initialization</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=11" title="Edit section: Uniform initialization"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>C++03 has a number of problems with initializing types. Several ways to do this exist, and some produce different results when interchanged. The traditional constructor syntax, for example, can look like a function declaration, and steps must be taken to ensure that the compiler's <a href="/wiki/Most_vexing_parse" title="Most vexing parse">most vexing parse</a> rule will not mistake it for such. Only aggregates and POD types can be initialized with aggregate initializers (using <code>SomeType var = {/*stuff*/};</code>). </p><p>C++11 provides a syntax that allows for fully uniform type initialization that works on any object. It expands on the initializer list syntax: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">BasicStruct</span> <span class="p">{</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">x</span><span class="p">;</span> <span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">y</span><span class="p">;</span> <span class="p">};</span> <span class="k">struct</span><span class="w"> </span><span class="nc">AltStruct</span> <span class="p">{</span> <span class="w"> </span><span class="n">AltStruct</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">y</span><span class="p">)</span> <span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">x_</span><span class="p">{</span><span class="n">x</span><span class="p">}</span> <span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="n">y_</span><span class="p">{</span><span class="n">y</span><span class="p">}</span> <span class="w"> </span><span class="p">{}</span> <span class="k">private</span><span class="o">:</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">x_</span><span class="p">;</span> <span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">y_</span><span class="p">;</span> <span class="p">};</span> <span class="n">BasicStruct</span><span class="w"> </span><span class="n">var1</span><span class="p">{</span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="mf">3.2</span><span class="p">};</span> <span class="n">AltStruct</span><span class="w"> </span><span class="n">var2</span><span class="p">{</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mf">4.3</span><span class="p">};</span> </pre></div> <p>The initialization of <code>var1</code> behaves exactly as though it were aggregate-initialization. That is, each data member of an object, in turn, will be copy-initialized with the corresponding value from the initializer-list. Implicit type conversion will be used where needed. If no conversion exists, or only a narrowing conversion exists, the program is ill-formed. The initialization of <code>var2</code> invokes the constructor. </p><p>One can also do this: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">IdString</span> <span class="p">{</span> <span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="w"> </span><span class="n">name</span><span class="p">;</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">identifier</span><span class="p">;</span> <span class="p">};</span> <span class="n">IdString</span><span class="w"> </span><span class="nf">get_string</span><span class="p">()</span> <span class="p">{</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">{</span><span class="s">&quot;foo&quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">42</span><span class="p">};</span><span class="w"> </span><span class="c1">//Note the lack of explicit type.</span> <span class="p">}</span> </pre></div> <p>Uniform initialization does not replace constructor syntax, which is still needed at times. If a class has an initializer list constructor (<code>TypeName(initializer_list&lt;SomeType&gt;);</code>), then it takes priority over other forms of construction, provided that the initializer list conforms to the sequence constructor's type. The C++11 version of <code>std::vector</code> has an initializer list constructor for its template type. Thus this code: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="w"> </span><span class="n">the_vec</span><span class="p">{</span><span class="mi">4</span><span class="p">};</span> </pre></div> <p>will call the initializer list constructor, not the constructor of <code>std::vector</code> that takes a single size parameter and creates the vector with that size. To access the latter constructor, the user will need to use the standard constructor syntax directly. </p> <div class="mw-heading mw-heading4"><h4 id="Type_inference">Type inference</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=12" title="Edit section: Type inference"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In C++03 (and C), to use a variable, its type must be specified explicitly. However, with the advent of template types and template metaprogramming techniques, the type of something, particularly the well-defined return value of a function, may not be easily expressed. Thus, storing intermediates in variables is difficult, possibly needing knowledge of the internals of a given metaprogramming library. </p><p>C++11 allows this to be mitigated in two ways. First, the definition of a variable with an explicit initialization can use the <code>auto</code> keyword.<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> This creates a variable of the specific type of the initializer: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">auto</span><span class="w"> </span><span class="n">some_strange_callable_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">bind</span><span class="p">(</span><span class="o">&amp;</span><span class="n">some_function</span><span class="p">,</span><span class="w"> </span><span class="n">_2</span><span class="p">,</span><span class="w"> </span><span class="n">_1</span><span class="p">,</span><span class="w"> </span><span class="n">some_object</span><span class="p">);</span> <span class="k">auto</span><span class="w"> </span><span class="n">other_variable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">5</span><span class="p">;</span> </pre></div> <p>The type of <code>some_strange_callable_type</code> is simply whatever the particular template function override of <code>std::bind</code> returns for those particular arguments. This type is easily determined procedurally by the compiler as part of its semantic analysis duties, but is not easy for the user to determine upon inspection. The type of <code>other_variable</code> is also well-defined, but it is easier for the user to determine. It is an <code>int</code>, which is the same type as the integer literal. </p><p>This use of the keyword <code>auto</code> in C++ re-purposes the semantics of this keyword, which was originally used in the typeless predecessor language <a href="/wiki/B_(programming_language)#Examples" title="B (programming language)">B</a> in a related role of denoting an untyped <a href="/wiki/Automatic_variable" title="Automatic variable">automatic variable</a> definition. </p><p>Further, the keyword <code><a href="/wiki/Decltype" title="Decltype">decltype</a></code> can be used to determine the type of expression at compile-time. For example: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="kt">int</span><span class="w"> </span><span class="n">some_int</span><span class="p">;</span> <span class="k">decltype</span><span class="p">(</span><span class="n">some_int</span><span class="p">)</span><span class="w"> </span><span class="n">other_integer_variable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">5</span><span class="p">;</span> </pre></div> <p>This is more useful in conjunction with <code>auto</code>, since the type of auto variable is known only to the compiler. However, <code>decltype</code> can also be very useful for expressions in code that makes heavy use of <a href="/wiki/Operator_overloading" title="Operator overloading">operator overloading</a> and specialized types. </p><p><code>auto</code> is also useful for reducing the verbosity of the code. For instance, instead of writing </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;::</span><span class="n">const_iterator</span><span class="w"> </span><span class="n">itr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">myvec</span><span class="p">.</span><span class="n">cbegin</span><span class="p">();</span><span class="w"> </span><span class="n">itr</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">myvec</span><span class="p">.</span><span class="n">cend</span><span class="p">();</span><span class="w"> </span><span class="o">++</span><span class="n">itr</span><span class="p">)</span> </pre></div> <p>the programmer can use the shorter </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">itr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">myvec</span><span class="p">.</span><span class="n">cbegin</span><span class="p">();</span><span class="w"> </span><span class="n">itr</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">myvec</span><span class="p">.</span><span class="n">cend</span><span class="p">();</span><span class="w"> </span><span class="o">++</span><span class="n">itr</span><span class="p">)</span> </pre></div> <p>which can be further compacted since "myvec" implements begin/end iterators: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="k">auto</span><span class="o">&amp;</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">myvec</span><span class="p">)</span> </pre></div> <p>This difference grows as the programmer begins to nest containers, though in such cases <code>typedef</code>s are a good way to decrease the amount of code. </p><p>The type denoted by <code>decltype</code> can be different from the type deduced by <code>auto</code>. </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;vector&gt;</span> <span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span> <span class="p">{</span> <span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="w"> </span><span class="n">v</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> <span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">v</span><span class="p">[</span><span class="mi">0</span><span class="p">];</span><span class="w"> </span><span class="c1">// a has type int</span> <span class="w"> </span><span class="k">decltype</span><span class="p">(</span><span class="n">v</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="c1">// b has type const int&amp;, the return type of</span> <span class="w"> </span><span class="c1">// std::vector&lt;int&gt;::operator[](size_type) const</span> <span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="c1">// c has type int</span> <span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">d</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">c</span><span class="p">;</span><span class="w"> </span><span class="c1">// d has type int</span> <span class="w"> </span><span class="k">decltype</span><span class="p">(</span><span class="n">c</span><span class="p">)</span><span class="w"> </span><span class="n">e</span><span class="p">;</span><span class="w"> </span><span class="c1">// e has type int, the type of the entity named by c</span> <span class="w"> </span><span class="k">decltype</span><span class="p">((</span><span class="n">c</span><span class="p">))</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">c</span><span class="p">;</span><span class="w"> </span><span class="c1">// f has type int&amp;, because (c) is an lvalue</span> <span class="w"> </span><span class="k">decltype</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="n">g</span><span class="p">;</span><span class="w"> </span><span class="c1">// g has type int, because 0 is an rvalue</span> <span class="p">}</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Range-based_for_loop">Range-based for loop</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=13" title="Edit section: Range-based for loop"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>C++11 extends the syntax of the <code>for</code> statement to allow for easy iteration over a range of elements: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="kt">int</span><span class="w"> </span><span class="n">my_array</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="p">};</span> <span class="c1">// double the value of each element in my_array:</span> <span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="o">&amp;</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">my_array</span><span class="p">)</span> <span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">*=</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> <span class="c1">// similar but also using type inference for array elements</span> <span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="k">auto</span><span class="o">&amp;</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">my_array</span><span class="p">)</span> <span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">*=</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> </pre></div> <p>This form of <code>for</code>, called the “range-based for”, will iterate over each element in the list. It will work for C-style arrays, initializer lists, and any type that has <code>begin()</code> and <code>end()</code> functions defined for it that return iterators. All the standard library containers that have begin/end pairs will work with the range-based for statement. </p> <div class="mw-heading mw-heading4"><h4 id="Lambda_functions_and_expressions">Lambda functions and expressions</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=14" title="Edit section: Lambda functions and expressions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Anonymous_function#C++_(since_C++11)" title="Anonymous function">Anonymous function §&#160;C++ (since C++11)</a></div> <p>C++11 provides the ability to create <a href="/wiki/Anonymous_function" title="Anonymous function">anonymous functions</a>, called lambda functions.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">&#91;</span>14<span class="cite-bracket">&#93;</span></a></sup> These are defined as follows: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="p">[](</span><span class="kt">int</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">y</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">y</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> </pre></div> <p>The return type (<code>-&gt; int</code> in this example) can be omitted as long as all <code>return</code> expressions return the same type. A lambda can optionally be a <a href="/wiki/Closure_(computer_science)" class="mw-redirect" title="Closure (computer science)">closure</a>. </p> <div class="mw-heading mw-heading4"><h4 id="Alternative_function_syntax"><span class="anchor" id="trailing-return-type"></span> Alternative function syntax</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=15" title="Edit section: Alternative function syntax"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/C_(programming_language)" title="C (programming language)">Standard C</a> function declaration syntax was perfectly adequate for the feature set of the C language. As C++ evolved from C, it kept the basic syntax and extended it where needed. However, as C++ grew more complex, it exposed several limits, especially regarding template function declarations. For example, in C++03 this is invalid: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">template</span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">Lhs</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">Rhs</span><span class="o">&gt;</span> <span class="w"> </span><span class="n">Ret</span><span class="w"> </span><span class="n">adding_func</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">Lhs</span><span class="w"> </span><span class="o">&amp;</span><span class="n">lhs</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">Rhs</span><span class="w"> </span><span class="o">&amp;</span><span class="n">rhs</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="k">return</span><span class="w"> </span><span class="n">lhs</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rhs</span><span class="p">;}</span><span class="w"> </span><span class="c1">//Ret must be the type of lhs+rhs</span> </pre></div> <p>The type <code>Ret</code> is whatever the addition of types <code>Lhs</code> and <code>Rhs</code> will produce. Even with the aforementioned C++11 functionality of <code>decltype</code>, this is not possible: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">template</span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">Lhs</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">Rhs</span><span class="o">&gt;</span> <span class="w"> </span><span class="k">decltype</span><span class="p">(</span><span class="n">lhs</span><span class="o">+</span><span class="n">rhs</span><span class="p">)</span><span class="w"> </span><span class="n">adding_func</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">Lhs</span><span class="w"> </span><span class="o">&amp;</span><span class="n">lhs</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">Rhs</span><span class="w"> </span><span class="o">&amp;</span><span class="n">rhs</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="k">return</span><span class="w"> </span><span class="n">lhs</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rhs</span><span class="p">;}</span><span class="w"> </span><span class="c1">//Not valid C++11</span> </pre></div> <p>This is not valid C++ because <code>lhs</code> and <code>rhs</code> have not yet been defined; they will not be valid identifiers until after the parser has parsed the rest of the function prototype. </p><p>To work around this, C++11 introduced a new function declaration syntax, with a <a href="/wiki/Trailing_return_type" title="Trailing return type"><i>trailing-return-type</i></a>:<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">&#91;</span>15<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">template</span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">Lhs</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">Rhs</span><span class="o">&gt;</span> <span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">adding_func</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">Lhs</span><span class="w"> </span><span class="o">&amp;</span><span class="n">lhs</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">Rhs</span><span class="w"> </span><span class="o">&amp;</span><span class="n">rhs</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="k">decltype</span><span class="p">(</span><span class="n">lhs</span><span class="o">+</span><span class="n">rhs</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="k">return</span><span class="w"> </span><span class="n">lhs</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rhs</span><span class="p">;}</span> </pre></div> <p>This syntax can be used for more mundane function declarations and definitions: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">SomeStruct</span> <span class="p">{</span> <span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">func_name</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">y</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="kt">int</span><span class="p">;</span> <span class="p">};</span> <span class="k">auto</span><span class="w"> </span><span class="n">SomeStruct</span><span class="o">::</span><span class="n">func_name</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">y</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="kt">int</span> <span class="p">{</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">y</span><span class="p">;</span> <span class="p">}</span> </pre></div> <p>The use of the “auto” keyword in this case is just part of the syntax and does not perform automatic type deduction in C++11. However, starting with C++14, the trailing return type can be removed entirely and the compiler will deduce the return type automatically.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">&#91;</span>16<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading4"><h4 id="Object_construction_improvement">Object construction improvement</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=16" title="Edit section: Object construction improvement"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In C++03, constructors of a class are not allowed to call other constructors in an initializer list of that class. Each constructor must construct all of its class members itself or call a common member function, as follows: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">class</span><span class="w"> </span><span class="nc">SomeType</span> <span class="p">{</span> <span class="k">public</span><span class="o">:</span> <span class="w"> </span><span class="n">SomeType</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">new_number</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">Construct</span><span class="p">(</span><span class="n">new_number</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="n">SomeType</span><span class="p">()</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">Construct</span><span class="p">(</span><span class="mi">42</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="k">private</span><span class="o">:</span> <span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">Construct</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">new_number</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">new_number</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">number</span><span class="p">;</span> <span class="p">};</span> </pre></div> <p>Constructors for base classes cannot be directly exposed to derived classes; each derived class must implement constructors even if a base class constructor would be appropriate. Non-constant data members of classes cannot be initialized at the site of the declaration of those members. They can be initialized only in a constructor. </p><p>C++11 provides solutions to all of these problems. </p><p>C++11 allows constructors to call other peer constructors (termed <a href="/wiki/Delegation_(programming)" class="mw-redirect" title="Delegation (programming)">delegation</a>). This allows constructors to utilize another constructor's behavior with a minimum of added code. Delegation has been used in other languages e.g., <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a> and <a href="/wiki/Objective-C" title="Objective-C">Objective-C</a>. </p><p>This syntax is as follows: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">class</span><span class="w"> </span><span class="nc">SomeType</span> <span class="p">{</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">number</span><span class="p">;</span> <span class="k">public</span><span class="o">:</span> <span class="w"> </span><span class="n">SomeType</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">new_number</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">number</span><span class="p">(</span><span class="n">new_number</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span> <span class="w"> </span><span class="n">SomeType</span><span class="p">()</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">SomeType</span><span class="p">(</span><span class="mi">42</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span> <span class="p">};</span> </pre></div> <p>In this case, the same effect could have been achieved by making <code>new_number</code> a default parameter. The new syntax, however, allows the default value (42) to be expressed in the implementation rather than the interface — a benefit to maintainers of library code since default values for function parameters are “baked in” to call sites, whereas constructor delegation allows the value to be changed without recompilation of the code using the library. </p><p>This comes with a caveat: C++03 considers an object to be constructed when its constructor finishes executing, but C++11 considers an object constructed once <i>any</i> constructor finishes execution. Since multiple constructors will be allowed to execute, this will mean that each delegating constructor will be executing on a fully constructed object of its own type. Derived class constructors will execute after all delegation in their base classes is complete. </p><p>For base-class constructors, C++11 allows a class to specify that base class constructors will be inherited. Thus, the C++11 compiler will generate code to perform the inheritance and the forwarding of the derived class to the base class. This is an all-or-nothing feature: either all of that base class's constructors are forwarded or none of them are. Also, an inherited constructor will be <a href="/wiki/Name_resolution_(programming_languages)#Name_masking" title="Name resolution (programming languages)">shadowed</a> if it matches the signature of a constructor of the derived class, and restrictions exist for multiple inheritance: class constructors cannot be <a href="/wiki/Multiple_inheritance#The_diamond_problem" title="Multiple inheritance">inherited from two classes that use constructors with the same signature</a>. </p><p>The syntax is as follows: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">class</span><span class="w"> </span><span class="nc">BaseClass</span> <span class="p">{</span> <span class="k">public</span><span class="o">:</span> <span class="w"> </span><span class="n">BaseClass</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">value</span><span class="p">);</span> <span class="p">};</span> <span class="k">class</span><span class="w"> </span><span class="nc">DerivedClass</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="k">public</span><span class="w"> </span><span class="n">BaseClass</span> <span class="p">{</span> <span class="k">public</span><span class="o">:</span> <span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="n">BaseClass</span><span class="o">::</span><span class="n">BaseClass</span><span class="p">;</span> <span class="p">};</span> </pre></div> <p>For member initialization, C++11 allows this syntax: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">class</span><span class="w"> </span><span class="nc">SomeClass</span> <span class="p">{</span> <span class="k">public</span><span class="o">:</span> <span class="w"> </span><span class="n">SomeClass</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span> <span class="w"> </span><span class="k">explicit</span><span class="w"> </span><span class="n">SomeClass</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">new_value</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">value</span><span class="p">(</span><span class="n">new_value</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span> <span class="k">private</span><span class="o">:</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">5</span><span class="p">;</span> <span class="p">};</span> </pre></div> <p>Any constructor of the class will initialize <code>value</code> with 5, if the constructor does not override the initialization with its own. So the above empty constructor will initialize <code>value</code> as the class definition states, but the constructor that takes an int will initialize it to the given parameter. </p><p>It can also use constructor or uniform initialization, instead of the assignment initialization shown above. </p> <div class="mw-heading mw-heading4"><h4 id="Explicit_overrides_and_final">Explicit overrides and final</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=17" title="Edit section: Explicit overrides and final"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In C++03, it is possible to accidentally create a new virtual function, when one intended to override a base class function. For example: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">Base</span> <span class="p">{</span> <span class="w"> </span><span class="k">virtual</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">some_func</span><span class="p">(</span><span class="kt">float</span><span class="p">);</span> <span class="p">};</span> <span class="k">struct</span><span class="w"> </span><span class="nc">Derived</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">Base</span> <span class="p">{</span> <span class="w"> </span><span class="k">virtual</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">some_func</span><span class="p">(</span><span class="kt">int</span><span class="p">);</span> <span class="p">};</span> </pre></div> <p>Suppose the <code>Derived::some_func</code> is intended to replace the base class version. But instead, because it has a different <a href="/wiki/Type_signature" title="Type signature">signature</a>, it creates a second virtual function. This is a common problem, particularly when a user goes to modify the base class. </p><p>C++11 provides syntax to solve this problem. </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">Base</span> <span class="p">{</span> <span class="w"> </span><span class="k">virtual</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">some_func</span><span class="p">(</span><span class="kt">float</span><span class="p">);</span> <span class="p">};</span> <span class="k">struct</span><span class="w"> </span><span class="nc">Derived</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">Base</span> <span class="p">{</span> <span class="w"> </span><span class="k">virtual</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">some_func</span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="p">;</span><span class="w"> </span><span class="c1">// ill-formed - doesn&#39;t override a base class method</span> <span class="p">};</span> </pre></div> <p>The <code>override</code> special identifier means that the compiler will check the base class(es) to see if there is a virtual function with this exact signature. And if there is not, the compiler will indicate an error. </p><p>C++11 also adds the ability to prevent inheriting from classes or simply preventing overriding methods in derived classes. This is done with the special identifier <code>final</code>. For example: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">Base1</span><span class="w"> </span><span class="k">final</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">};</span> <span class="k">struct</span><span class="w"> </span><span class="nc">Derived1</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">Base1</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">};</span><span class="w"> </span><span class="c1">// ill-formed because the class Base1 has been marked final</span> </pre></div> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">Base2</span> <span class="p">{</span> <span class="w"> </span><span class="k">virtual</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">f</span><span class="p">()</span><span class="w"> </span><span class="k">final</span><span class="p">;</span> <span class="p">};</span> <span class="k">struct</span><span class="w"> </span><span class="nc">Derived2</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">Base2</span> <span class="p">{</span> <span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">f</span><span class="p">();</span><span class="w"> </span><span class="c1">// ill-formed because the virtual function Base2::f has been marked final</span> <span class="p">};</span> </pre></div> <p>In this example, the <code>virtual void f() final;</code> statement declares a new virtual function, but it also prevents derived classes from overriding it. It also has the effect of preventing derived classes from using that particular function name and parameter combination. </p><p>Neither <code>override</code> nor <code>final</code> are language keywords. They are technically identifiers for declarator attributes: </p> <ul><li>they gain special meaning as attributes only when used in those specific trailing contexts (after all type specifiers, access specifiers, member declarations (for struct, class and enum types) and declarator specifiers, but before initialization or code implementation of each declarator in a comma-separated list of declarators);</li> <li>they do not alter the declared type signature and do not declare or override any new identifier in any scope;</li> <li>the recognized and accepted declarator attributes may be extended in future versions of C++ (some compiler-specific extensions already recognize added declarator attributes, to provide code generation options or optimization hints to the compiler, or to generate added data into the compiled code, intended for debuggers, linkers, and deployment of the compiled code, or to provide added system-specific security attributes, or to enhance <a href="/wiki/Reflective_programming" title="Reflective programming">reflective programming</a> (reflection) abilities at runtime, or to provide added binding information for interoperability with other programming languages and runtime systems; these extensions may take parameters between parentheses after the declarator attribute identifier; for ANSI conformance, these compiler-specific extensions should use the double underscore prefix convention).</li> <li>In any other location, they can be valid identifiers for new declarations (and later use if they are accessible).</li></ul> <div class="mw-heading mw-heading4"><h4 id="Null_pointer_constant_and_type">Null pointer constant and type</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=18" title="Edit section: Null pointer constant and type"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For the purposes of this section and this section alone, every occurrence of "<code>0</code>" is meant as "a constant expression which evaluates to <code>0</code>, which is of type int". In reality, the constant expression can be of any integral type. </p><p>Since the dawn of C in 1972, the constant <code><a href="/wiki/0_(number)" class="mw-redirect" title="0 (number)">0</a></code> has had the double role of constant integer and <a href="/wiki/Null_pointer" title="Null pointer">null pointer</a> constant. The ambiguity inherent in the double meaning of <code>0</code> was dealt with in C by using the preprocessor macro <code>NULL</code>, which commonly expands to either <code>((void*)0)</code> or <code>0</code>. C++ forbids implicit conversion from <code>void *</code> to other pointer types, thus removing the benefit of casting <code>0</code> to <code>void *</code>. As a consequence, only <code>0</code> is allowed as a null pointer constant. This interacts poorly with <a href="/wiki/Function_overloading" title="Function overloading">function overloading</a>: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="kt">void</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">);</span> <span class="kt">void</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span><span class="kt">int</span><span class="p">);</span> </pre></div> <p>If <code>NULL</code> is defined as <code>0</code> (which is usually the case in C++), the statement <code>foo(NULL);</code> will call <code>foo(int)</code>, which is almost certainly not what the programmer intended, and not what a superficial reading of the code suggests. </p><p>C++11 corrects this by introducing a new keyword to serve as a distinguished null pointer constant: <code>nullptr</code>. It is of type <code>nullptr_t</code>, which is implicitly convertible and comparable to any pointer type or pointer-to-member type. It is not implicitly convertible or comparable to integral types, except for <code>bool</code>. While the original proposal specified that an rvalue of type <code>nullptr_t</code> should not be convertible to <code>bool</code>, the core language working group decided that such a conversion would be desirable, for consistency with regular pointer types. The proposed wording changes were unanimously voted into the Working Paper in June 2008.<sup class="plainlinks nourlexpansion citation" id="ref_n2697"><a class="external autonumber" href="https://en.wikipedia.org/wiki/C%2B%2B11#endnote_n2697">[1]</a></sup> A similar proposal was also brought to the C standard working group and was accepted for inclusion in <a href="/wiki/C23_(C_standard_revision)" title="C23 (C standard revision)">C23</a>.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">&#91;</span>17<span class="cite-bracket">&#93;</span></a></sup> </p><p>For backwards compatibility reasons, <code>0</code> remains a valid null pointer constant. </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">pc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">nullptr</span><span class="p">;</span><span class="w"> </span><span class="c1">// OK</span> <span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">pi</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">nullptr</span><span class="p">;</span><span class="w"> </span><span class="c1">// OK</span> <span class="kt">bool</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">nullptr</span><span class="p">;</span><span class="w"> </span><span class="c1">// OK. b is false.</span> <span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">nullptr</span><span class="p">;</span><span class="w"> </span><span class="c1">// error</span> <span class="n">foo</span><span class="p">(</span><span class="k">nullptr</span><span class="p">);</span><span class="w"> </span><span class="c1">// calls foo(nullptr_t), not foo(int);</span> <span class="cm">/*</span> <span class="cm"> Note that foo(nullptr_t) will actually call foo(char *) in the example above using an implicit conversion,</span> <span class="cm"> only if no other functions are overloading with compatible pointer types in scope.</span> <span class="cm"> If multiple overloadings exist, the resolution will fail as it is ambiguous,</span> <span class="cm"> unless there is an explicit declaration of foo(nullptr_t).</span> <span class="cm"> In standard types headers for C++11, the nullptr_t type should be declared as:</span> <span class="cm"> typedef decltype(nullptr) nullptr_t;</span> <span class="cm"> but not as:</span> <span class="cm"> typedef int nullptr_t; // prior versions of C++ which need NULL to be defined as 0</span> <span class="cm"> typedef void *nullptr_t; // ANSI C which defines NULL as ((void*)0)</span> <span class="cm">*/</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Strongly_typed_enumerations">Strongly typed enumerations</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=19" title="Edit section: Strongly typed enumerations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In C++03, enumerations are not type-safe. They are effectively integers, even when the enumeration types are distinct. This allows the comparison between two enum values of different enumeration types. The only safety that C++03 provides is that an integer or a value of one enum type does not convert implicitly to another enum type. Further, the underlying integral type is implementation-defined; code that depends on the size of the enumeration is thus non-portable. Lastly, enumeration values are scoped to the enclosing scope. Thus, it is not possible for two separate enumerations in the same scope to have matching member names. </p><p>C++11 allows a special classification of enumeration that has none of these issues. This is expressed using the <code>enum class</code> (<code>enum struct</code> is also accepted as a synonym) declaration: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">enum</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">Enumeration</span> <span class="p">{</span> <span class="w"> </span><span class="n">Val1</span><span class="p">,</span> <span class="w"> </span><span class="n">Val2</span><span class="p">,</span> <span class="w"> </span><span class="n">Val3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">100</span><span class="p">,</span> <span class="w"> </span><span class="n">Val4</span><span class="w"> </span><span class="c1">// = 101</span> <span class="p">};</span> </pre></div> <p>This enumeration is type-safe. Enum class values are not implicitly converted to integers. Thus, they cannot be compared to integers either (the expression <code>Enumeration::Val4 == 101</code> gives a compile error). </p><p>The underlying type of enum classes is always known. The default type is <code>int</code>; this can be overridden to a different integral type as can be seen in this example: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">enum</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">Enum2</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="p">{</span><span class="n">Val1</span><span class="p">,</span><span class="w"> </span><span class="n">Val2</span><span class="p">};</span> </pre></div> <p>With old-style enumerations the values are placed in the outer scope. With new-style enumerations they are placed within the scope of the enum class name. So in the above example, <code>Val1</code> is undefined, but <code>Enum2::Val1</code> is defined. </p><p>There is also a transitional syntax to allow old-style enumerations to provide explicit scoping, and the definition of the underlying type: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">enum</span><span class="w"> </span><span class="nc">Enum3</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="p">{</span><span class="n">Val1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">Val2</span><span class="p">};</span> </pre></div> <p>In this case the enumerator names are defined in the enumeration's scope (<code>Enum3::Val1</code>), but for backwards compatibility they are also placed in the enclosing scope. </p><p>Forward-declaring enums is also possible in C++11. Formerly, enum types could not be forward-declared because the size of the enumeration depends on the definition of its members. As long as the size of the enumeration is specified either implicitly or explicitly, it can be forward-declared: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">enum</span><span class="w"> </span><span class="nc">Enum1</span><span class="p">;</span><span class="w"> </span><span class="c1">// Invalid in C++03 and C++11; the underlying type cannot be determined.</span> <span class="k">enum</span><span class="w"> </span><span class="nc">Enum2</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="p">;</span><span class="w"> </span><span class="c1">// Valid in C++11, the underlying type is specified explicitly.</span> <span class="k">enum</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">Enum3</span><span class="p">;</span><span class="w"> </span><span class="c1">// Valid in C++11, the underlying type is int.</span> <span class="k">enum</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">Enum4</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="p">;</span><span class="w"> </span><span class="c1">// Valid in C++11.</span> <span class="k">enum</span><span class="w"> </span><span class="nc">Enum2</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">short</span><span class="p">;</span><span class="w"> </span><span class="c1">// Invalid in C++11, because Enum2 was formerly declared with a different underlying type.</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Right_angle_bracket">Right angle bracket</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=20" title="Edit section: Right angle bracket"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>C++03's parser defines “<code>&gt;&gt;</code>” as the right shift operator or stream extraction operator in all cases. However, with nested template declarations, there is a tendency for the programmer to neglect to place a space between the two right angle brackets, thus causing a compiler syntax error. </p><p>C++11 improves the specification of the parser so that multiple right angle brackets will be interpreted as closing the template argument list where it is reasonable. This can be overridden by using parentheses around parameter expressions using the “<code>&gt;</code>”, “<code>&gt;=</code>” or “<code>&gt;&gt;</code>” binary operators: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">template</span><span class="o">&lt;</span><span class="kt">bool</span><span class="w"> </span><span class="n">Test</span><span class="o">&gt;</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">SomeType</span><span class="p">;</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">SomeType</span><span class="o">&lt;</span><span class="mi">1</span><span class="o">&gt;</span><span class="mi">2</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">x1</span><span class="p">;</span><span class="w"> </span><span class="c1">// Interpreted as a std::vector of SomeType&lt;true&gt;,</span> <span class="w"> </span><span class="c1">// followed by &quot;2 &gt;&gt; x1&quot;, which is not valid syntax for a declarator. 1 is true.</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">SomeType</span><span class="o">&lt;</span><span class="p">(</span><span class="mi">1</span><span class="o">&gt;</span><span class="mi">2</span><span class="p">)</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">x1</span><span class="p">;</span><span class="w"> </span><span class="c1">// Interpreted as std::vector of SomeType&lt;false&gt;,</span> <span class="w"> </span><span class="c1">// followed by the declarator &quot;x1&quot;, which is valid C++11 syntax. (1&gt;2) is false.</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Explicit_conversion_operators">Explicit conversion operators</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=21" title="Edit section: Explicit conversion operators"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>C++98 added the <code>explicit</code> keyword as a modifier on constructors to prevent single-argument constructors from being used as implicit type conversion operators. However, this does nothing for actual conversion operators. For example, a smart pointer class may have an <code>operator bool()</code> to allow it to act more like a primitive pointer: if it includes this conversion, it can be tested with <code>if (smart_ptr_variable)</code> (which would be true if the pointer was non-null and false otherwise). However, this allows other, unintended conversions as well. Because C++ <code>bool</code> is defined as an arithmetic type, it can be implicitly converted to integral or even floating-point types, which allows for mathematical operations that are not intended by the user. </p><p>In C++11, the <code>explicit</code> keyword can now be applied to conversion operators. As with constructors, it prevents using those conversion functions in implicit conversions. However, language contexts that specifically need a Boolean value (the conditions of if-statements and loops, and operands to the logical operators) count as explicit conversions and can thus use a bool conversion operator. </p><p>For example, this feature solves cleanly the <a href="https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Safe_bool" class="extiw" title="b:More C++ Idioms/Safe bool">safe bool</a> issue. </p> <div class="mw-heading mw-heading4"><h4 id="Template_aliases">Template aliases</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=22" title="Edit section: Template aliases"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In C++03, it is possible to define a typedef only as a synonym for another type, including a synonym for a template specialization with all actual template arguments specified. It is not possible to create a typedef template. For example: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">template</span><span class="w"> </span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">First</span><span class="p">,</span><span class="w"> </span><span class="k">typename</span><span class="w"> </span><span class="nc">Second</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">Third</span><span class="o">&gt;</span> <span class="k">class</span><span class="w"> </span><span class="nc">SomeType</span><span class="p">;</span> <span class="k">template</span><span class="w"> </span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">Second</span><span class="o">&gt;</span> <span class="k">typedef</span><span class="w"> </span><span class="n">SomeType</span><span class="o">&lt;</span><span class="n">OtherType</span><span class="p">,</span><span class="w"> </span><span class="n">Second</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="o">&gt;</span><span class="w"> </span><span class="n">TypedefName</span><span class="p">;</span><span class="w"> </span><span class="c1">// Invalid in C++03</span> </pre></div> <p>This will not compile. </p><p>C++11 adds this ability with this syntax: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">template</span><span class="w"> </span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">First</span><span class="p">,</span><span class="w"> </span><span class="k">typename</span><span class="w"> </span><span class="nc">Second</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">Third</span><span class="o">&gt;</span> <span class="k">class</span><span class="w"> </span><span class="nc">SomeType</span><span class="p">;</span> <span class="k">template</span><span class="w"> </span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">Second</span><span class="o">&gt;</span> <span class="k">using</span><span class="w"> </span><span class="n">TypedefName</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SomeType</span><span class="o">&lt;</span><span class="n">OtherType</span><span class="p">,</span><span class="w"> </span><span class="n">Second</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="o">&gt;</span><span class="p">;</span> </pre></div> <p>The <code>using</code> syntax can also be used as type aliasing in C++11: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">typedef</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">FunctionType</span><span class="p">)(</span><span class="kt">double</span><span class="p">);</span><span class="w"> </span><span class="c1">// Old style</span> <span class="k">using</span><span class="w"> </span><span class="n">FunctionType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="p">)(</span><span class="kt">double</span><span class="p">);</span><span class="w"> </span><span class="c1">// New introduced syntax</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Unrestricted_unions">Unrestricted unions</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=23" title="Edit section: Unrestricted unions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In C++03, there are restrictions on what types of objects can be members of a <code>union</code>. For example, unions cannot contain any objects that define a non-trivial constructor or destructor. C++11 lifts some of these restrictions.<sup class="plainlinks nourlexpansion citation" id="ref_n2544"><a class="external autonumber" href="https://en.wikipedia.org/wiki/C%2B%2B11#endnote_n2544">[2]</a></sup> </p><p>If a <code>union</code> member has a non trivial <a href="/wiki/Special_member_functions" title="Special member functions">special member function</a>, the compiler will not generate the equivalent member function for the <code>union</code> and it must be manually defined. </p><p>This is a simple example of a union permitted in C++11: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;new&gt;</span><span class="c1"> // Needed for placement &#39;new&#39;.</span> <span class="k">struct</span><span class="w"> </span><span class="nc">Point</span> <span class="p">{</span> <span class="w"> </span><span class="n">Point</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span> <span class="w"> </span><span class="n">Point</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">y</span><span class="p">)</span><span class="o">:</span><span class="w"> </span><span class="n">x_</span><span class="p">(</span><span class="n">x</span><span class="p">),</span><span class="w"> </span><span class="n">y_</span><span class="p">(</span><span class="n">y</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span><span class="w"> </span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">x_</span><span class="p">,</span><span class="w"> </span><span class="n">y_</span><span class="p">;</span> <span class="p">};</span> <span class="k">union</span><span class="w"> </span><span class="nc">U</span> <span class="p">{</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">z</span><span class="p">;</span> <span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">w</span><span class="p">;</span> <span class="w"> </span><span class="n">Point</span><span class="w"> </span><span class="n">p</span><span class="p">;</span><span class="w"> </span><span class="c1">// Invalid in C++03; valid in C++11.</span> <span class="w"> </span><span class="n">U</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"> </span><span class="c1">// Due to the Point member, a constructor definition is now needed.</span> <span class="w"> </span><span class="n">U</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">Point</span><span class="o">&amp;</span><span class="w"> </span><span class="n">pt</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">p</span><span class="p">(</span><span class="n">pt</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span><span class="w"> </span><span class="c1">// Construct Point object using initializer list.</span> <span class="w"> </span><span class="n">U</span><span class="o">&amp;</span><span class="w"> </span><span class="k">operator</span><span class="o">=</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">Point</span><span class="o">&amp;</span><span class="w"> </span><span class="n">pt</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">new</span><span class="p">(</span><span class="o">&amp;</span><span class="n">p</span><span class="p">)</span><span class="w"> </span><span class="n">Point</span><span class="p">(</span><span class="n">pt</span><span class="p">);</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="o">*</span><span class="k">this</span><span class="p">;</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="c1">// Assign Point object using placement &#39;new&#39;.</span> <span class="p">};</span> </pre></div> <p>The changes will not break any existing code since they only relax current rules. </p> <div class="mw-heading mw-heading3"><h3 id="Core_language_functionality_improvements">Core language functionality improvements</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=24" title="Edit section: Core language functionality improvements"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>These features allow the language to do things that were formerly impossible, exceedingly verbose, or needed non-portable libraries. </p> <div class="mw-heading mw-heading4"><h4 id="Variadic_templates">Variadic templates</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=25" title="Edit section: Variadic templates"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Variadic_template" title="Variadic template">Variadic template</a></div> <p>In C++11, templates can take variable numbers of template parameters. This also allows the definition of type-safe <a href="/wiki/Variadic_function" title="Variadic function">variadic functions</a>. </p> <div class="mw-heading mw-heading4"><h4 id="New_string_literals">New string literals</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=26" title="Edit section: New string literals"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>C++03 offers two kinds of <a href="/wiki/String_literal" title="String literal">string literals</a>. The first kind, contained within double quotes, produces a null-terminated array of type <code>const char</code>. The second kind, defined as <code>L""</code>, produces a null-terminated array of type <code>const wchar_t</code>, where <code>wchar_t</code> is a wide-character of undefined size and semantics. Neither literal type offers support for string literals with <a href="/wiki/UTF-8" title="UTF-8">UTF-8</a>, <a href="/wiki/UTF-16" title="UTF-16">UTF-16</a>, or any other kind of <a href="/wiki/Unicode" title="Unicode">Unicode</a> <a href="/wiki/Comparison_of_Unicode_encodings" title="Comparison of Unicode encodings">encodings</a>. </p><p>C++11 supports three Unicode encodings: UTF-8, UTF-16, and <a href="/wiki/UTF-32" title="UTF-32">UTF-32</a>. The definition of the type <code>char</code> has been modified to explicitly express that it is at least the size needed to store an eight-bit coding of UTF-8, and large enough to contain any member of the compiler's basic execution character set. It was formerly defined as only the latter in the C++ standard itself, then relying on the C standard to guarantee at least 8 bits. Furthermore, C++11 adds two new character types: <code>char16_t</code> and <code>char32_t</code>. These are designed to store UTF-16 and UTF-32 respectively. </p><p>Creating string literals for each of the supported encodings can be done thus: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="sa">u8</span><span class="s">&quot;I&#39;m a UTF-8 string.&quot;</span> <span class="sa">u</span><span class="s">&quot;This is a UTF-16 string.&quot;</span> <span class="sa">U</span><span class="s">&quot;This is a UTF-32 string.&quot;</span> </pre></div> <p>The type of the first string is the usual <code>const char[]</code>. The type of the second string is <code>const char16_t[]</code> (note lower case 'u' prefix). The type of the third string is <code>const char32_t[]</code> (upper case 'U' prefix). </p><p>When building Unicode string literals, it is often useful to insert Unicode code points directly into the string. To do this, C++11 allows this syntax: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="sa">u8</span><span class="s">&quot;This is a Unicode Character: </span><span class="se">\u2018</span><span class="s">.&quot;</span> <span class="sa">u</span><span class="s">&quot;This is a bigger Unicode Character: </span><span class="se">\u2018</span><span class="s">.&quot;</span> <span class="sa">U</span><span class="s">&quot;This is a Unicode Character: </span><span class="se">\U00002018</span><span class="s">.&quot;</span> </pre></div> <p>The number after the <code>\u</code> is a hexadecimal number; it does not need the usual <code>0x</code> prefix. The identifier <code>\u</code> represents a 16-bit Unicode code point; to enter a 32-bit code point, use <code>\U</code> and a 32-bit hexadecimal number. Only valid Unicode code points can be entered. For example, code points on the range U+D800–U+DFFF are forbidden, as they are reserved for surrogate pairs in UTF-16 encodings. </p><p>It is also sometimes useful to avoid escaping strings manually, particularly for using literals of <a href="/wiki/XML" title="XML">XML</a> files, scripting languages, or regular expressions. C++11 provides a raw string literal: </p> <pre>R"(The String Data \ Stuff " )" R"delimiter(The String Data \ Stuff " )delimiter" </pre> <p>In the first case, everything between the <code>"(</code> and the <code>)"</code> is part of the string. The <code>"</code> and <code>\</code> characters do not need to be escaped. In the second case, the <code>"delimiter(</code> starts the string, and it ends only when <code>)delimiter"</code> is reached. The string <code>delimiter</code> can be any string up to 16 characters in length, including the empty string. This string cannot contain spaces, control characters, <code>(</code>, <code>)</code>, or the <code>\</code> character. Using this delimiter string, the user can have the sequence <code>)"</code> within raw string literals. For example, <code>R"delimiter("(a-z)")delimiter"</code> is equivalent to <code>"\"(a-z)\""</code>. </p><p>Raw string literals can be combined with the wide literal or any of the Unicode literal prefixes: </p> <pre>u8R"XXX(I'm a "raw UTF-8" string.)XXX" uR"*(This is a "raw UTF-16" string.)*" UR"(This is a "raw UTF-32" string.)" </pre> <div class="mw-heading mw-heading4"><h4 id="User-defined_literals">User-defined literals</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=27" title="Edit section: User-defined literals"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>C++03 provides a number of literals. The characters <code>12.5</code> are a literal that is resolved by the compiler as a type <code>double</code> with the value of 12.5. However, the addition of the suffix <code>f</code>, as in <code>12.5f</code>, creates a value of type <code>float</code> that contains the value 12.5. The suffix modifiers for literals are fixed by the C++ specification, and C++03 code cannot create new literal modifiers. </p><p>By contrast, C++11 enables the user to define new kinds of literal modifiers that will construct objects based on the string of characters that the literal modifies. </p><p>Transformation of literals is redefined into two distinct phases: raw and cooked. A raw literal is a sequence of characters of some specific type, while the cooked literal is of a separate type. The C++ literal <code>1234</code>, as a raw literal, is this sequence of characters <code>'1'</code>, <code>'2'</code>, <code>'3'</code>, <code>'4'</code>. As a cooked literal, it is the integer 1234. The C++ literal <code>0xA</code> in raw form is <code>'0'</code>, <code>'x'</code>, <code>'A'</code>, while in cooked form it is the integer 10. </p><p>Literals can be extended in both raw and cooked forms, with the exception of string literals, which can be processed only in cooked form. This exception is due to the fact that strings have prefixes that affect the specific meaning and type of the characters in question. </p><p>All user-defined literals are suffixes; defining prefix literals is not possible. All suffixes starting with any character except underscore (<code>_</code>) are reserved by the standard. Thus, all user-defined literals must have suffixes starting with an underscore (<code>_</code>).<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">&#91;</span>18<span class="cite-bracket">&#93;</span></a></sup> </p><p>User-defined literals processing the raw form of the literal are defined via a literal operator, which is written as <code>operator ""</code>. An example follows: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="n">OutputType</span><span class="w"> </span><span class="k">operator</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="n">_mysuffix</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">literal_string</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="c1">// assumes that OutputType has a constructor that takes a const char *</span> <span class="w"> </span><span class="n">OutputType</span><span class="w"> </span><span class="nf">ret</span><span class="p">(</span><span class="n">literal_string</span><span class="p">);</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> <span class="p">}</span> <span class="n">OutputType</span><span class="w"> </span><span class="n">some_variable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1234</span><span class="n">_mysuffix</span><span class="p">;</span> <span class="c1">// assumes that OutputType has a get_value() method that returns a double</span> <span class="n">assert</span><span class="p">(</span><span class="n">some_variable</span><span class="p">.</span><span class="n">get_value</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mf">1234.0</span><span class="p">)</span> </pre></div> <p>The assignment statement <code>OutputType some_variable = 1234_mysuffix;</code> executes the code defined by the user-defined literal function. This function is passed <code>"1234"</code> as a C-style string, so it has a null terminator. </p><p>An alternative mechanism for processing integer and floating point raw literals is via a <a href="/wiki/Variadic_template" title="Variadic template">variadic template</a>: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">template</span><span class="o">&lt;</span><span class="kt">char</span><span class="p">...</span><span class="o">&gt;</span><span class="w"> </span><span class="n">OutputType</span><span class="w"> </span><span class="k">operator</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="n">_tuffix</span><span class="p">();</span> <span class="n">OutputType</span><span class="w"> </span><span class="n">some_variable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1234</span><span class="n">_tuffix</span><span class="p">;</span> <span class="n">OutputType</span><span class="w"> </span><span class="n">another_variable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">2.17</span><span class="n">_tuffix</span><span class="p">;</span> </pre></div> <p>This instantiates the literal processing function as <code>operator "" _tuffix&lt;'1', '2', '3', '4'&gt;()</code>. In this form, there is no null character terminating the string. The main purpose for doing this is to use C++11's <code>constexpr</code> keyword to ensure that the compiler will transform the literal entirely at compile time, assuming <code>OutputType</code> is a constexpr-constructible and copyable type, and the literal processing function is a <code>constexpr</code> function. </p><p>For numeric literals, the type of the cooked literal is either <code>unsigned long long</code> for integral literals or <code>long double</code> for floating point literals. (Note: There is no need for signed integral types because a sign-prefixed literal is parsed as an expression containing the sign as a unary prefix operator and the unsigned number.) There is no alternative template form: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="n">OutputType</span><span class="w"> </span><span class="k">operator</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="n">_suffix</span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="kt">long</span><span class="p">);</span> <span class="n">OutputType</span><span class="w"> </span><span class="k">operator</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="n">_suffix</span><span class="p">(</span><span class="kt">long</span><span class="w"> </span><span class="kt">double</span><span class="p">);</span> <span class="n">OutputType</span><span class="w"> </span><span class="n">some_variable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1234</span><span class="n">_suffix</span><span class="p">;</span><span class="w"> </span><span class="c1">// Uses the &#39;unsigned long long&#39; overload.</span> <span class="n">OutputType</span><span class="w"> </span><span class="n">another_variable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">3.1416</span><span class="n">_suffix</span><span class="p">;</span><span class="w"> </span><span class="c1">// Uses the &#39;long double&#39; overload.</span> </pre></div> <p>In accord with the formerly mentioned new string prefixes, for string literals, these are used: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="n">OutputType</span><span class="w"> </span><span class="k">operator</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="n">_ssuffix</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string_values</span><span class="p">,</span><span class="w"> </span><span class="kt">size_t</span><span class="w"> </span><span class="n">num_chars</span><span class="p">);</span> <span class="n">OutputType</span><span class="w"> </span><span class="k">operator</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="n">_ssuffix</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">wchar_t</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string_values</span><span class="p">,</span><span class="w"> </span><span class="kt">size_t</span><span class="w"> </span><span class="n">num_chars</span><span class="p">);</span> <span class="n">OutputType</span><span class="w"> </span><span class="k">operator</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="n">_ssuffix</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char16_t</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string_values</span><span class="p">,</span><span class="w"> </span><span class="kt">size_t</span><span class="w"> </span><span class="n">num_chars</span><span class="p">);</span> <span class="n">OutputType</span><span class="w"> </span><span class="k">operator</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="n">_ssuffix</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char32_t</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string_values</span><span class="p">,</span><span class="w"> </span><span class="kt">size_t</span><span class="w"> </span><span class="n">num_chars</span><span class="p">);</span> <span class="n">OutputType</span><span class="w"> </span><span class="n">some_variable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;1234&quot;</span><span class="n">_ssuffix</span><span class="p">;</span><span class="w"> </span><span class="c1">// Uses the &#39;const char *&#39; overload.</span> <span class="n">OutputType</span><span class="w"> </span><span class="n">some_variable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sa">u8</span><span class="s">&quot;1234&quot;</span><span class="n">_ssuffix</span><span class="p">;</span><span class="w"> </span><span class="c1">// Uses the &#39;const char *&#39; overload.</span> <span class="n">OutputType</span><span class="w"> </span><span class="n">some_variable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sa">L</span><span class="s">&quot;1234&quot;</span><span class="n">_ssuffix</span><span class="p">;</span><span class="w"> </span><span class="c1">// Uses the &#39;const wchar_t *&#39; overload.</span> <span class="n">OutputType</span><span class="w"> </span><span class="n">some_variable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sa">u</span><span class="s">&quot;1234&quot;</span><span class="n">_ssuffix</span><span class="p">;</span><span class="w"> </span><span class="c1">// Uses the &#39;const char16_t *&#39; overload.</span> <span class="n">OutputType</span><span class="w"> </span><span class="n">some_variable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sa">U</span><span class="s">&quot;1234&quot;</span><span class="n">_ssuffix</span><span class="p">;</span><span class="w"> </span><span class="c1">// Uses the &#39;const char32_t *&#39; overload.</span> </pre></div> <p>There is no alternative template form. Character literals are defined similarly. </p> <div class="mw-heading mw-heading4"><h4 id="Multithreading_memory_model">Multithreading memory model</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=28" title="Edit section: Multithreading memory model"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">See also: <a href="/wiki/Memory_model_(computing)" class="mw-redirect" title="Memory model (computing)">Memory model (computing)</a></div> <p>C++11 standardizes support for <a href="/wiki/Thread_(computer_science)" class="mw-redirect" title="Thread (computer science)">multithreaded programming</a>. </p><p>There are two parts involved: a memory model which allows multiple threads to co-exist in a program and library support for interaction between threads. (See this article's section on <a href="#Threading_facilities">threading facilities</a>.) </p><p>The memory model defines when multiple threads may access the same memory location, and specifies when updates by one thread become visible to other threads. </p> <div class="mw-heading mw-heading4"><h4 id="Thread-local_storage">Thread-local storage</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=29" title="Edit section: Thread-local storage"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In a multi-threaded environment, it is common for every thread to have some unique <a href="/wiki/Variable_(programming)" class="mw-redirect" title="Variable (programming)">variables</a>. This already happens for the local variables of a function, but it does not happen for global and static variables. </p><p>A new <a href="/wiki/Thread-local_storage" title="Thread-local storage"><i>thread-local</i> storage</a> duration (in addition to the existing <i>static</i>, <i>dynamic</i> and <i>automatic</i>) is indicated by the storage specifier <code>thread_local</code>. </p><p>Any object which could have static storage duration (i.e., lifetime spanning the entire execution of the program) may be given thread-local duration instead. The intent is that like any other static-duration variable, a thread-local object can be initialized using a constructor and destroyed using a destructor. </p> <div class="mw-heading mw-heading4"><h4 id="Explicitly_defaulted_special_member_functions">Explicitly defaulted special member functions</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=30" title="Edit section: Explicitly defaulted special member functions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In C++03, the compiler provides, for classes that do not provide them for themselves, a default constructor, a copy constructor, a copy assignment operator (<code>operator=</code>), and a destructor. The programmer can override these defaults by defining custom versions. C++ also defines several global operators (such as <code>operator new</code>) that work on all classes, which the programmer can override. </p><p>However, there is very little control over creating these defaults. Making a class inherently non-copyable, for example, may be done by declaring a private copy constructor and copy assignment operator and not defining them. Attempting to use these functions is a violation of the <a href="/wiki/One_Definition_Rule" title="One Definition Rule">One Definition Rule</a> (ODR). While a diagnostic message is not required,<sup id="cite_ref-C++03_3.2/3_19-0" class="reference"><a href="#cite_note-C++03_3.2/3-19"><span class="cite-bracket">&#91;</span>19<span class="cite-bracket">&#93;</span></a></sup> violations may result in a linker error. </p><p>In the case of the default constructor, the compiler will not generate a default constructor if a class is defined with <i>any</i> constructors. This is useful in many cases, but it is also useful to be able to have both specialized constructors and the compiler-generated default. </p><p>C++11 allows the explicit defaulting and deleting of these special member functions.<sup id="cite_ref-openstd_default_delete_20-0" class="reference"><a href="#cite_note-openstd_default_delete-20"><span class="cite-bracket">&#91;</span>20<span class="cite-bracket">&#93;</span></a></sup> For example, this class explicitly declares that a default constructor can be used: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">class</span><span class="w"> </span><span class="nc">SomeType</span> <span class="p">{</span> <span class="w"> </span><span class="n">SomeType</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">default</span><span class="p">;</span><span class="w"> </span><span class="c1">//The default constructor is explicitly stated.</span> <span class="w"> </span><span class="n">SomeType</span><span class="p">(</span><span class="n">OtherType</span><span class="w"> </span><span class="n">value</span><span class="p">);</span> <span class="p">};</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Explicitly_deleted_functions">Explicitly deleted functions</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=31" title="Edit section: Explicitly deleted functions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A function can be explicitly disabled. This is useful for preventing implicit type conversions. The <code>= delete</code> specifier can be used to prohibit calling a function with particular parameter types.<sup id="cite_ref-openstd_default_delete_20-1" class="reference"><a href="#cite_note-openstd_default_delete-20"><span class="cite-bracket">&#91;</span>20<span class="cite-bracket">&#93;</span></a></sup> For example: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="kt">void</span><span class="w"> </span><span class="nf">noInt</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">i</span><span class="p">);</span> <span class="kt">void</span><span class="w"> </span><span class="nf">noInt</span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">delete</span><span class="p">;</span> </pre></div> <p>An attempt to call <code>noInt()</code> with an <code>int</code> parameter will be rejected by the compiler, instead of performing a silent conversion to <code>double</code>. Calling <code>noInt()</code> with a <code>float</code> still works. </p><p>It is possible to prohibit calling the function with any type other than <code>double</code> by using a template: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="kt">double</span><span class="w"> </span><span class="nf">onlyDouble</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">d</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="k">return</span><span class="w"> </span><span class="n">d</span><span class="p">;}</span> <span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">T</span><span class="o">&gt;</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">onlyDouble</span><span class="p">(</span><span class="n">T</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">delete</span><span class="p">;</span> </pre></div> <p>calling <code>onlyDouble(1.0)</code> will work, while <code>onlyDouble(1.0f)</code> will generate a compiler error. </p><p>Class member functions and constructors can also be deleted. For example, it is possible to prevent copying class objects by deleting the copy constructor and <code>operator =</code>: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">class</span><span class="w"> </span><span class="nc">NonCopyable</span> <span class="p">{</span> <span class="w"> </span><span class="n">NonCopyable</span><span class="p">();</span> <span class="w"> </span><span class="n">NonCopyable</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">NonCopyable</span><span class="o">&amp;</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">delete</span><span class="p">;</span> <span class="w"> </span><span class="n">NonCopyable</span><span class="o">&amp;</span><span class="w"> </span><span class="k">operator</span><span class="o">=</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">NonCopyable</span><span class="o">&amp;</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">delete</span><span class="p">;</span> <span class="p">};</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Type_long_long_int">Type <code>long long int</code></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=32" title="Edit section: Type long long int"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In C++03, the largest integer type is <code>long int</code>. It is guaranteed to have at least as many usable bits as <code>int</code>. This resulted in <code>long int</code> having size of 64 bits on some popular implementations and 32 bits on others. C++11 adds a new integer type <code>long long int</code> to address this issue. It is guaranteed to be at least as large as a <code>long int</code>, and have no fewer than 64 bits. The type was originally introduced by <a href="/wiki/C99" title="C99">C99</a> to the standard C, and most C++ compilers supported it as an extension already.<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">&#91;</span>21<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">&#91;</span>22<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading4"><h4 id="Static_assertions">Static assertions</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=33" title="Edit section: Static assertions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>C++03 provides two methods to test <a href="/wiki/Assertion_(computing)" class="mw-redirect" title="Assertion (computing)">assertions</a>: the macro <code>assert</code> and the preprocessor directive <code>#error</code>. However, neither is appropriate for use in templates: the macro tests the assertion at execution-time, while the preprocessor directive tests the assertion during preprocessing, which happens before instantiation of templates. Neither is appropriate for testing properties that are dependent on template parameters. </p><p>The new utility introduces a new way to test assertions at compile-time, using the new keyword <code>static_assert</code>. The declaration assumes this form: </p> <pre>static_assert (<i>constant-expression</i>, <i>error-message</i>); </pre> <p>Here are some examples of how <code>static_assert</code> can be used: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">static_assert</span><span class="p">((</span><span class="n">GREEKPI</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mf">3.14</span><span class="p">)</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="p">(</span><span class="n">GREEKPI</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mf">3.15</span><span class="p">),</span><span class="w"> </span><span class="s">&quot;GREEKPI is inaccurate!&quot;</span><span class="p">);</span> </pre></div> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">template</span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">T</span><span class="o">&gt;</span> <span class="k">struct</span><span class="w"> </span><span class="nc">Check</span> <span class="p">{</span> <span class="w"> </span><span class="k">static_assert</span><span class="p">(</span><span class="k">sizeof</span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="o">&lt;=</span><span class="w"> </span><span class="k">sizeof</span><span class="p">(</span><span class="n">T</span><span class="p">),</span><span class="w"> </span><span class="s">&quot;T is not big enough!&quot;</span><span class="p">);</span> <span class="p">};</span> </pre></div> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">template</span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">Integral</span><span class="o">&gt;</span> <span class="n">Integral</span><span class="w"> </span><span class="n">foo</span><span class="p">(</span><span class="n">Integral</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">Integral</span><span class="w"> </span><span class="n">y</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">static_assert</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">is_integral</span><span class="o">&lt;</span><span class="n">Integral</span><span class="o">&gt;::</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;foo() parameter must be an integral type.&quot;</span><span class="p">);</span> <span class="p">}</span> </pre></div> <p>When the constant expression is <code>false</code> the compiler produces an error message. The first example is similar to the preprocessor directive <code>#error</code>, although the preprocessor does only support integral types.<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">&#91;</span>23<span class="cite-bracket">&#93;</span></a></sup> In contrast, in the second example the assertion is checked at every instantiation of the template class <code>Check</code>. </p><p>Static assertions are useful outside of templates also. For instance, a given implementation of an algorithm might depend on the size of a <code>long long</code> being larger than an <code>int</code>, something the standard does not guarantee. Such an assumption is valid on most systems and compilers, but not all. </p> <div class="mw-heading mw-heading4"><h4 id="Allow_sizeof_to_work_on_members_of_classes_without_an_explicit_object">Allow <code>sizeof</code> to work on members of classes without an explicit object</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=34" title="Edit section: Allow sizeof to work on members of classes without an explicit object"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In C++03, the <code><a href="/wiki/Sizeof" title="Sizeof">sizeof</a></code> operator can be used on types and objects. But it cannot be used to do this: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">SomeType</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">OtherType</span><span class="w"> </span><span class="n">member</span><span class="p">;</span><span class="w"> </span><span class="p">};</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">SomeType</span><span class="o">::</span><span class="n">member</span><span class="p">);</span><span class="w"> </span><span class="c1">// Does not work with C++03. Okay with C++11</span> </pre></div> <p>This should return the size of <code>OtherType</code>. C++03 disallows this, so it is a compile error. C++11 allows it. It is also allowed for the <code>alignof</code> operator introduced in C++11. </p> <div class="mw-heading mw-heading4"><h4 id="Control_and_query_object_alignment">Control and query object alignment</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=35" title="Edit section: Control and query object alignment"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>C++11 allows variable alignment to be queried and controlled with <code>alignof</code> and <code>alignas</code>. </p><p>The <code>alignof</code> operator takes the type and returns the power of 2 byte boundary on which the type instances must be allocated (as a <code>std::size_t</code>). When given a reference type <code>alignof</code> returns the referenced type's alignment; for arrays it returns the element type's alignment. </p><p>The <code>alignas</code> specifier controls the memory alignment for a variable. The specifier takes a constant or a type; when supplied a type <code>alignas(T)</code> is shorthand for <code>alignas(alignof(T))</code>. For example, to specify that a char array should be properly aligned to hold a float: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">alignas</span><span class="p">(</span><span class="kt">float</span><span class="p">)</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">c</span><span class="p">[</span><span class="k">sizeof</span><span class="p">(</span><span class="kt">float</span><span class="p">)]</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Allow_garbage_collected_implementations">Allow garbage collected implementations</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=36" title="Edit section: Allow garbage collected implementations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Prior C++ standards provided for programmer-driven garbage collection via <code>set_new_handler</code>, but gave no definition of object reachability for the purpose of automatic garbage collection. C++11 defines conditions under which pointer values are "safely derived" from other values. An implementation may specify that it operates under <i>strict pointer safety</i>, in which case pointers that are not derived according to these rules can become invalid. </p> <div class="mw-heading mw-heading4"><h4 id="Attributes">Attributes</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=37" title="Edit section: Attributes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>C++11 provides a standardized syntax for compiler/tool extensions to the language. Such extensions were traditionally specified using <code>#pragma</code> directive or vendor-specific keywords (like <code>__attribute__</code> for GNU and <code>__declspec</code> for Microsoft). With the new syntax, added information can be specified in a form of an attribute enclosed in double square brackets. An attribute can be applied to various elements of source code: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="kt">int</span><span class="w"> </span><span class="p">[[</span><span class="n">attr1</span><span class="p">]]</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="p">[[</span><span class="n">attr2</span><span class="p">,</span><span class="w"> </span><span class="n">attr3</span><span class="p">]];</span> <span class="p">[[</span><span class="n">attr4</span><span class="p">(</span><span class="n">arg1</span><span class="p">,</span><span class="w"> </span><span class="n">arg2</span><span class="p">)]]</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">cond</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="p">[[</span><span class="n">vendor</span><span class="o">::</span><span class="n">attr5</span><span class="p">]]</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> <span class="p">}</span> </pre></div> <p>In the example above, attribute <code>attr1</code> applies to the type of variable <code>i</code>, <code>attr2</code> and <code>attr3</code> apply to the variable itself, <code>attr4</code> applies to the <code>if</code> statement and <code>vendor::attr5</code> applies to the return statement. In general (but with some exceptions), an attribute specified for a named entity is placed after the name, and before the entity otherwise, as shown above, several attributes may be listed inside one pair of double square brackets, added arguments may be provided for an attribute, and attributes may be scoped by vendor-specific attribute namespaces. </p><p>It is recommended that attributes have no language semantic meaning and do not change the sense of a program when ignored. Attributes can be useful for providing information that, for example, helps the compiler to issue better diagnostics or optimize the generated code. </p><p>C++11 provides two standard attributes itself: <code>noreturn</code> to specify that a function does not return, and <code>carries_dependency</code> to help optimizing multi-threaded code by indicating that function arguments or return value carry a dependency.<sup class="noprint Inline-Template" style="margin-left:0.1em; white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:Please_clarify" title="Wikipedia:Please clarify"><span title="The text near this tag may need clarification or removal of jargon. (September 2014)">clarification needed</span></a></i>&#93;</sup> </p> <div class="mw-heading mw-heading2"><h2 id="C++_standard_library_changes"><span id="C.2B.2B_standard_library_changes"></span>C++ standard library changes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=38" title="Edit section: C++ standard library changes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A number of new features were introduced in the C++11 standard library. Many of these could have been implemented under the old standard, but some rely (to a greater or lesser extent) on new C++11 core features. </p><p>A large part of the new <a href="/wiki/Library_(computer_science)" class="mw-redirect" title="Library (computer science)">libraries</a> was defined in the document <i><a href="/wiki/Technical_Report_1" class="mw-redirect" title="Technical Report 1">C++ Standards Committee's Library Technical Report</a></i> (called TR1), which was published in 2005. Various full and partial implementations of TR1 are currently available using the namespace <code>std::tr1</code>. For C++11 they were moved to namespace <code>std</code>. However, as TR1 features were brought into the C++11 standard library, they were upgraded where appropriate with C++11 language features that were not available in the initial TR1 version. Also, they may have been enhanced with features that were possible under C++03, but were not part of the original TR1 specification. </p> <div class="mw-heading mw-heading3"><h3 id="Upgrades_to_standard_library_components">Upgrades to standard library components</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=39" title="Edit section: Upgrades to standard library components"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>C++11 offers a number of new language features that the currently existing standard library components can benefit from. For example, most standard library containers can benefit from Rvalue reference based move constructor support, both for quickly moving heavy containers around and for moving the contents of those containers to new memory locations. The standard library components were upgraded with new C++11 language features where appropriate. These include, but are not necessarily limited to: </p> <ul><li>Rvalue references and the associated move support</li> <li>Support for the UTF-16 encoding unit, and UTF-32 encoding unit Unicode character types</li> <li><a href="/wiki/Variadic_templates" class="mw-redirect" title="Variadic templates">Variadic templates</a> (coupled with Rvalue references to allow for perfect forwarding)</li> <li>Compile-time constant expressions</li> <li><code><a href="/wiki/Decltype" title="Decltype">decltype</a></code></li> <li><code>explicit</code> conversion operators</li> <li>Functions declared defaulted or deleted</li></ul> <p>Further, much time has passed since the prior C++ standard. Much code using the standard library has been written. This has revealed parts of the standard libraries that could use some improving. Among the many areas of improvement considered were standard library <a href="/wiki/Allocator_(C%2B%2B)" title="Allocator (C++)">allocators</a>. A new scope-based model of allocators was included in C++11 to supplement the prior model. </p> <div class="mw-heading mw-heading3"><h3 id="Threading_facilities">Threading facilities</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=40" title="Edit section: Threading facilities"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>While the C++03 language provides a memory model that supports threading, the primary support for actually using threading comes with the C++11 standard library. </p><p>A thread class (<code>std::thread</code>) is provided, which takes a <a href="/wiki/Function_object" title="Function object">function object</a> (and an optional series of arguments to pass to it) to run in the new thread. It is possible to cause a thread to halt until another executing thread completes, providing thread joining support via the <code>std::thread::join()</code> member function. Access is provided, where feasible, to the underlying native thread object(s) for <a href="/wiki/Platform_(computing)" class="mw-redirect" title="Platform (computing)">platform</a>-specific operations by the <code>std::thread::native_handle()</code> member function. </p><p>For synchronization between threads, appropriate <a href="/wiki/Mutual_exclusion" title="Mutual exclusion">mutexes</a> (<code>std::mutex</code>, <code>std::recursive_mutex</code>, etc.) and <a href="/wiki/Monitor_(synchronization)" title="Monitor (synchronization)">condition variables</a> (<code>std::condition_variable</code> and <code>std::condition_variable_any</code>) are added to the library. These are accessible via <a href="/wiki/Resource_Acquisition_Is_Initialization" class="mw-redirect" title="Resource Acquisition Is Initialization">Resource Acquisition Is Initialization</a> (RAII) locks (<code>std::lock_guard</code> and <code>std::unique_lock</code>) and locking algorithms for easy use. </p><p>For high-performance, low-level work, communicating between threads is sometimes needed without the overhead of mutexes. This is done using <a href="/wiki/Atomic_operation" class="mw-redirect" title="Atomic operation">atomic operations</a> on memory locations. These can optionally specify the minimum memory visibility constraints needed for an operation. Explicit <a href="/wiki/Memory_barrier" title="Memory barrier">memory barriers</a> may also be used for this purpose. </p><p>The C++11 thread library also includes <a href="/wiki/Futures_and_promises" title="Futures and promises">futures and promises</a> for passing asynchronous results between threads, and <code>std::packaged_task</code> for wrapping up a function call that can generate such an asynchronous result. The futures proposal was criticized because it lacks a way to combine futures and check for the completion of one promise inside a set of promises.<sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">&#91;</span>24<span class="cite-bracket">&#93;</span></a></sup> </p><p>Further high-level threading facilities such as <a href="/wiki/Thread_pool" title="Thread pool">thread pools</a> have been remanded to a future C++ <a href="/wiki/Technical_Report_1" class="mw-redirect" title="Technical Report 1">technical report</a>. They are not part of C++11, but their eventual implementation is expected to be built entirely on top of the thread library features. </p><p>The new <code>std::async</code> facility provides a convenient method of running tasks and tying them to a <code>std::future</code>. The user can choose whether the task is to be run asynchronously on a separate thread or synchronously on a thread that waits for the value. By default, the implementation can choose, which provides an easy way to take advantage of hardware concurrency without oversubscription, and provides some of the advantages of a thread pool for simple usages. </p> <div class="mw-heading mw-heading3"><h3 id="Tuple_types">Tuple types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=41" title="Edit section: Tuple types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Tuple" title="Tuple">Tuples</a> are collections composed of heterogeneous objects of pre-arranged dimensions. A tuple can be considered a generalization of a struct's member variables. </p><p>The C++11 version of the TR1 tuple type benefited from C++11 features like <a href="#Variadic_templates">variadic templates</a>. To implement reasonably, the TR1 version required an implementation-defined maximum number of contained types, and substantial macro trickery. By contrast, the implementation of the C++11 version requires no explicit implementation-defined maximum number of types. Though compilers will have an internal maximum recursion depth for template instantiation (which is normal), the C++11 version of tuples will not expose this value to the user. </p><p>Using <a href="/wiki/Variadic_templates" class="mw-redirect" title="Variadic templates">variadic templates</a>, the declaration of the tuple class looks as follows: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">template</span><span class="w"> </span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="p">...</span><span class="n">Types</span><span class="o">&gt;</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">tuple</span><span class="p">;</span> </pre></div> <p>An example of definition and use of the tuple type: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">typedef</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">tuple</span><span class="w"> </span><span class="o">&lt;</span><span class="kt">int</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="p">,</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="o">&amp;</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*&gt;</span><span class="w"> </span><span class="n">test_tuple</span><span class="p">;</span> <span class="kt">long</span><span class="w"> </span><span class="n">lengthy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">12</span><span class="p">;</span> <span class="n">test_tuple</span><span class="w"> </span><span class="n">proof</span><span class="w"> </span><span class="p">(</span><span class="mi">18</span><span class="p">,</span><span class="w"> </span><span class="mf">6.5</span><span class="p">,</span><span class="w"> </span><span class="n">lengthy</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Ciao!&quot;</span><span class="p">);</span> <span class="n">lengthy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">get</span><span class="o">&lt;</span><span class="mi">0</span><span class="o">&gt;</span><span class="p">(</span><span class="n">proof</span><span class="p">);</span><span class="w"> </span><span class="c1">// Assign to &#39;lengthy&#39; the value 18.</span> <span class="n">std</span><span class="o">::</span><span class="n">get</span><span class="o">&lt;</span><span class="mi">3</span><span class="o">&gt;</span><span class="p">(</span><span class="n">proof</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot; Beautiful!&quot;</span><span class="p">;</span><span class="w"> </span><span class="c1">// Modify the tuple’s fourth element.</span> </pre></div> <p>It's possible to create the tuple <code>proof</code> without defining its contents, but only if the tuple elements' types possess default constructors. Moreover, it's possible to assign a tuple to another tuple: if the two tuples’ types are the same, each element type must possess a copy constructor; otherwise, each element type of the right-side tuple must be convertible to that of the corresponding element type of the left-side tuple or that the corresponding element type of the left-side tuple has a suitable constructor. </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">typedef</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">tuple</span><span class="w"> </span><span class="o">&lt;</span><span class="kt">int</span><span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="n">tuple_1</span><span class="w"> </span><span class="n">t1</span><span class="p">;</span> <span class="k">typedef</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">tuple</span><span class="w"> </span><span class="o">&lt;</span><span class="kt">char</span><span class="p">,</span><span class="w"> </span><span class="kt">short</span><span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="n">tuple_2</span><span class="w"> </span><span class="n">t2</span><span class="w"> </span><span class="p">(</span><span class="sc">&#39;X&#39;</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Hola!&quot;</span><span class="p">);</span> <span class="n">t1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">t2</span><span class="p">;</span><span class="w"> </span><span class="c1">// Ok, first two elements can be converted,</span> <span class="w"> </span><span class="c1">// the third one can be constructed from a &#39;const char *&#39;.</span> </pre></div> <p>Just like <code>std::make_pair</code> for <code>std::pair</code>, there exists <code>std::make_tuple</code> to automatically create <code>std::tuple</code>s using type deduction and <code>auto</code> helps to declare such a tuple. <code>std::tie</code> creates tuples of lvalue references to help unpack tuples. <code>std::ignore</code> also helps here. See the example: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">auto</span><span class="w"> </span><span class="n">record</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">make_tuple</span><span class="p">(</span><span class="s">&quot;Hari Ram&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;New Delhi&quot;</span><span class="p">,</span><span class="w"> </span><span class="mf">3.5</span><span class="p">,</span><span class="w"> </span><span class="sc">&#39;A&#39;</span><span class="p">);</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="p">;</span><span class="w"> </span><span class="kt">float</span><span class="w"> </span><span class="n">gpa</span><span class="w"> </span><span class="p">;</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">grade</span><span class="w"> </span><span class="p">;</span> <span class="n">std</span><span class="o">::</span><span class="n">tie</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">ignore</span><span class="p">,</span><span class="w"> </span><span class="n">gpa</span><span class="p">,</span><span class="w"> </span><span class="n">grade</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">record</span><span class="w"> </span><span class="p">;</span><span class="w"> </span><span class="c1">// std::ignore helps drop the place name</span> <span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="sc">&#39; &#39;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">gpa</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="sc">&#39; &#39;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">grade</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="w"> </span><span class="p">;</span> </pre></div> <p>Relational operators are available (among tuples with the same number of elements), and two expressions are available to check a tuple's characteristics (only during compilation): </p> <ul><li><code>std::tuple_size&lt;T&gt;::value</code> returns the number of elements in the tuple <code>T</code>,</li> <li><code>std::tuple_element&lt;I, T&gt;::type</code> returns the type of the object number <code>I</code> of the tuple <code>T</code>.</li></ul> <div class="mw-heading mw-heading3"><h3 id="Hash_tables">Hash tables</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=42" title="Edit section: Hash tables"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Including <a href="/wiki/Hash_table" title="Hash table">hash tables</a> (unordered associative containers) in the C++ standard library is one of the most recurring requests. It was not adopted in C++03 due to time constraints only. Although hash tables are less efficient than a <a href="/wiki/Balanced_tree" class="mw-redirect" title="Balanced tree">balanced tree</a> in the worst case (in the presence of many collisions), they perform better in many real applications. </p><p>Collisions are managed only via <i><a href="/wiki/Hash_tables#Separate_chaining" class="mw-redirect" title="Hash tables">linear chaining</a></i> because the committee didn't consider it to be opportune to standardize solutions of <i><a href="/wiki/Open_addressing" title="Open addressing">open addressing</a></i> that introduce quite a lot of intrinsic problems (above all when erasure of elements is admitted). To avoid name clashes with non-standard libraries that developed their own hash table implementations, the prefix “unordered” was used instead of “hash”. </p><p>The new library has four types of hash tables, differentiated by whether or not they accept elements with the same key (unique keys or equivalent keys), and whether they map each key to an associated value. They correspond to the four existing <a href="/wiki/Binary_search_tree" title="Binary search tree">binary search tree</a> based associative containers, with an <style data-mw-deduplicate="TemplateStyles:r886049734">.mw-parser-output .monospaced{font-family:monospace,monospace}</style><span class="monospaced">unordered_</span> prefix. </p> <table class="wikitable" style="text-align: center"> <tbody><tr> <th>Type of hash table</th> <th>Associated values</th> <th>Equivalent keys </th></tr> <tr> <td style="text-align: left"><code><a href="/wiki/Unordered_associative_containers_(C%2B%2B)" title="Unordered associative containers (C++)">std::unordered_set</a></code></td> <td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no">No</td> <td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no">No </td></tr> <tr> <td style="text-align: left"><code><a href="/wiki/Unordered_associative_containers_(C%2B%2B)" title="Unordered associative containers (C++)">std::unordered_multiset</a></code></td> <td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no">No</td> <td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes">Yes </td></tr> <tr> <td style="text-align: left"><code><a href="/wiki/Unordered_associative_containers_(C%2B%2B)" title="Unordered associative containers (C++)">std::unordered_map</a></code></td> <td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes">Yes</td> <td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no">No </td></tr> <tr> <td style="text-align: left"><code><a href="/wiki/Unordered_associative_containers_(C%2B%2B)" title="Unordered associative containers (C++)">std::unordered_multimap</a></code></td> <td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes">Yes</td> <td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes">Yes </td></tr></tbody></table> <p>The new classes fulfill all the requirements of a <a href="/wiki/Standard_Template_Library#Containers" title="Standard Template Library">container class</a>, and have all the methods needed to access elements: <code>insert</code>, <code>erase</code>, <code>begin</code>, <code>end</code>. </p><p>This new feature didn't need any C++ language core extensions (though implementations will take advantage of various C++11 language features), only a small extension of the header <code>&lt;functional&gt;</code> and the introduction of headers <code>&lt;unordered_set&gt;</code> and <code>&lt;unordered_map&gt;</code>. No other changes to any existing standard classes were needed, and it doesn't depend on any other extensions of the standard library. </p> <div class="mw-heading mw-heading3"><h3 id="std::array_and_std::forward_list">std::array and std::forward_list</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=43" title="Edit section: std::array and std::forward_list"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In addition to the hash tables two more containers was added to the standard library. The std::array is a fixed size container that is more efficient than std::vector but safer and easier to use than a c-style array. The std::forward_list is a single linked list that provides more space efficient storage than the double linked std::list when bidirectional iteration is not needed. </p> <div class="mw-heading mw-heading3"><h3 id="Regular_expressions"><span class="anchor" id="regex"></span> Regular expressions</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=44" title="Edit section: Regular expressions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The new library, defined in the new header <code>&lt;regex&gt;</code>, is made of a couple of new classes: </p> <ul><li><a href="/wiki/Regular_expression" title="Regular expression">regular expressions</a> are represented by instance of the template class <code>std::regex</code>;</li> <li>occurrences are represented by instance of the template class <code>std::match_results</code>,</li> <li>std::regex_iterator is used to iterate over all matches of a regex</li></ul> <p>The function <code>std::regex_search</code> is used for searching, while for ‘search and replace’ the function <code>std::regex_replace</code> is used which returns a new string.<sup id="cite_ref-25" class="reference"><a href="#cite_note-25"><span class="cite-bracket">&#91;</span>25<span class="cite-bracket">&#93;</span></a></sup> </p><p>Here is an example of the use of <code>std::regex_iterator</code>: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;regex&gt;</span> <span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">pattern</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sa">R</span><span class="s">&quot;</span><span class="dl">(</span><span class="s">[^ ,.\t\n]+</span><span class="dl">)</span><span class="s">&quot;</span><span class="p">;</span><span class="w"> </span><span class="c1">// find words separated by space, comma, period tab newline</span> <span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">regex</span><span class="w"> </span><span class="nf">rgx</span><span class="p">(</span><span class="n">pattern</span><span class="p">);</span><span class="w"> </span><span class="c1">// throws exception on invalid pattern</span> <span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">target</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;Unseen University - Ankh-Morpork&quot;</span><span class="p">;</span> <span class="w"> </span><span class="c1">// Use a regex_iterator to identify all words of &#39;target&#39; separated by characters of &#39;pattern&#39;.</span> <span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cregex_iterator</span><span class="p">(</span><span class="n">target</span><span class="p">,</span><span class="w"> </span><span class="n">target</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">strlen</span><span class="p">(</span><span class="n">target</span><span class="p">),</span><span class="w"> </span><span class="n">rgx</span><span class="p">);</span> <span class="w"> </span><span class="c1">// make an end of sequence iterator</span> <span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">end</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cregex_iterator</span><span class="p">();</span> <span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(;</span><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">end</span><span class="p">;</span><span class="w"> </span><span class="o">++</span><span class="n">iter</span><span class="p">)</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="w"> </span><span class="n">match_str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iter</span><span class="o">-&gt;</span><span class="n">str</span><span class="p">();</span> <span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">match_str</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="sc">&#39;\n&#39;</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> </pre></div> <p>The library <code>&lt;regex&gt;</code> requires neither alteration of any existing header (though it will use them where appropriate) nor an extension of the core language. In <a href="/wiki/POSIX" title="POSIX">POSIX</a> C, regular expressions are also available via the <a href="/wiki/C_POSIX_library#regex.h" title="C POSIX library">C POSIX library#regex.h</a>. </p> <div class="mw-heading mw-heading3"><h3 id="General-purpose_smart_pointers">General-purpose smart pointers</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=45" title="Edit section: General-purpose smart pointers"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Smart_pointer#C++_smart_pointers" title="Smart pointer">C++ smart pointers</a></div> <p>C++11 provides <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">std::unique_ptr</code>, and improvements to <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">std::shared_ptr</code> and <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">std::weak_ptr</code> from TR1. <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">std::auto_ptr</code> is deprecated. </p> <div class="mw-heading mw-heading3"><h3 id="Extensible_random_number_facility">Extensible random number facility</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=46" title="Edit section: Extensible random number facility"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The C standard library provides the ability to generate <a href="/wiki/Pseudorandom_number" class="mw-redirect" title="Pseudorandom number">pseudorandom numbers</a> via the function <code>rand</code>. However, the algorithm is delegated entirely to the library vendor. C++ inherited this functionality with no changes, but C++11 provides a new method for generating pseudorandom numbers. </p><p>C++11's random number functionality is split into two parts: a generator engine that contains the random number generator's state and produces the pseudorandom numbers; and a distribution, which determines the range and <a href="/wiki/Distribution_(mathematics)" title="Distribution (mathematics)">mathematical distribution</a> of the outcome. These two are combined to form a random number generator object. </p><p>Unlike the C standard <code>rand</code>, the C++11 mechanism will come with three base generator engine algorithms: </p> <ul><li><code><a href="/wiki/Linear_congruential_generator" title="Linear congruential generator">linear_congruential_engine</a></code>,</li> <li><code><a href="/wiki/Subtract_with_carry" title="Subtract with carry">subtract_with_carry_engine</a></code>, and</li> <li><code><a href="/wiki/Mersenne_twister" class="mw-redirect" title="Mersenne twister">mersenne_twister_engine</a></code>.</li></ul> <p>C++11 also provides a number of standard distributions: </p> <ul><li><code><a href="/wiki/Uniform_distribution_(discrete)" class="mw-redirect" title="Uniform distribution (discrete)">uniform_int_distribution</a></code>,</li> <li><code><a href="/wiki/Uniform_distribution_(continuous)" class="mw-redirect" title="Uniform distribution (continuous)">uniform_real_distribution</a></code>,</li> <li><code><a href="/wiki/Bernoulli_distribution" title="Bernoulli distribution">bernoulli_distribution</a></code>,</li> <li><code><a href="/wiki/Binomial_distribution" title="Binomial distribution">binomial_distribution</a></code>,</li> <li><code><a href="/wiki/Geometric_distribution" title="Geometric distribution">geometric_distribution</a></code>,</li> <li><code><a href="/wiki/Negative_binomial_distribution" title="Negative binomial distribution">negative_binomial_distribution</a></code>,</li> <li><code><a href="/wiki/Poisson_distribution" title="Poisson distribution">poisson_distribution</a></code>,</li> <li><code><a href="/wiki/Exponential_distribution" title="Exponential distribution">exponential_distribution</a></code>,</li> <li><code><a href="/wiki/Gamma_distribution" title="Gamma distribution">gamma_distribution</a></code>,</li> <li><code><a href="/wiki/Weibull_distribution" title="Weibull distribution">weibull_distribution</a></code>,</li> <li><code><a href="/wiki/Generalized_extreme_value_distribution" title="Generalized extreme value distribution">extreme_value_distribution</a></code>,</li> <li><code><a href="/wiki/Normal_distribution" title="Normal distribution">normal_distribution</a></code>,</li> <li><code><a href="/wiki/Log-normal_distribution" title="Log-normal distribution">lognormal_distribution</a></code>,</li> <li><code><a href="/wiki/Chi_squared_distribution" class="mw-redirect" title="Chi squared distribution">chi_squared_distribution</a></code>,</li> <li><code><a href="/wiki/Cauchy_distribution" title="Cauchy distribution">cauchy_distribution</a></code>,</li> <li><code><a href="/wiki/F-distribution" title="F-distribution">fisher_f_distribution</a></code>,</li> <li><code><a href="/wiki/Student%27s_t-distribution" title="Student&#39;s t-distribution">student_t_distribution</a></code>,</li> <li><code><a href="/wiki/Discrete_distribution#Discrete_probability_distribution" class="mw-redirect" title="Discrete distribution">discrete_distribution</a></code>,</li> <li><code><a href="/wiki/Step_function" title="Step function">piecewise_constant_distribution</a></code> and</li> <li><code><a href="/wiki/Piecewise_linear_function" title="Piecewise linear function">piecewise_linear_distribution</a></code>.</li></ul> <p>The generator and distributions are combined as in this example: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;random&gt;</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;functional&gt;</span> <span class="n">std</span><span class="o">::</span><span class="n">uniform_int_distribution</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="w"> </span><span class="n">distribution</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">99</span><span class="p">);</span> <span class="n">std</span><span class="o">::</span><span class="n">mt19937</span><span class="w"> </span><span class="n">engine</span><span class="p">;</span><span class="w"> </span><span class="c1">// Mersenne twister MT19937</span> <span class="k">auto</span><span class="w"> </span><span class="n">generator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">bind</span><span class="p">(</span><span class="n">distribution</span><span class="p">,</span><span class="w"> </span><span class="n">engine</span><span class="p">);</span> <span class="kt">int</span><span class="w"> </span><span class="n">random</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">generator</span><span class="p">();</span><span class="w"> </span><span class="c1">// Generate a uniform integral variate between 0 and 99.</span> <span class="kt">int</span><span class="w"> </span><span class="n">random2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">distribution</span><span class="p">(</span><span class="n">engine</span><span class="p">);</span><span class="w"> </span><span class="c1">// Generate another sample directly using the distribution and the engine objects.</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Wrapper_reference">Wrapper reference</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=47" title="Edit section: Wrapper reference"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A <a href="/wiki/Adapter_pattern" title="Adapter pattern">wrapper</a> reference is obtained from an instance of the class template <code>reference_wrapper</code>. Wrapper references are similar to normal references (‘<code>&amp;</code>’) of the C++ language. To obtain a wrapper reference from any object the function template <code>ref</code> is used (for a constant reference <code>cref</code> is used). </p><p>Wrapper references are useful above all for function templates, where references to parameters rather than copies are needed: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">// This function will take a reference to the parameter &#39;r&#39; and increment it.</span> <span class="kt">void</span><span class="w"> </span><span class="nf">func</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="o">&amp;</span><span class="n">r</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">r</span><span class="o">++</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="c1">// Template function.</span> <span class="k">template</span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">F</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">P</span><span class="o">&gt;</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">g</span><span class="w"> </span><span class="p">(</span><span class="n">F</span><span class="w"> </span><span class="n">f</span><span class="p">,</span><span class="w"> </span><span class="n">P</span><span class="w"> </span><span class="n">t</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">f</span><span class="p">(</span><span class="n">t</span><span class="p">);</span><span class="w"> </span><span class="p">}</span> <span class="kt">int</span><span class="w"> </span><span class="n">main</span><span class="p">()</span> <span class="p">{</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> <span class="w"> </span><span class="n">g</span><span class="w"> </span><span class="p">(</span><span class="n">func</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span><span class="w"> </span><span class="c1">// &#39;g&lt;void (int &amp;r), int&gt;&#39; is instantiated</span> <span class="w"> </span><span class="c1">// then &#39;i&#39; will not be modified.</span> <span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span><span class="w"> </span><span class="c1">// Output -&gt; 0</span> <span class="w"> </span><span class="n">g</span><span class="w"> </span><span class="p">(</span><span class="n">func</span><span class="p">,</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">ref</span><span class="p">(</span><span class="n">i</span><span class="p">));</span><span class="w"> </span><span class="c1">// &#39;g&lt;void(int &amp;r),reference_wrapper&lt;int&gt;&gt;&#39; is instantiated</span> <span class="w"> </span><span class="c1">// then &#39;i&#39; will be modified.</span> <span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span><span class="w"> </span><span class="c1">// Output -&gt; 1</span> <span class="p">}</span> </pre></div> <p>This new utility was added to the existing <code>&lt;functional&gt;</code> header and didn't need further extensions of the C++ language. </p> <div class="mw-heading mw-heading3"><h3 id="Polymorphic_wrappers_for_function_objects">Polymorphic wrappers for function objects</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=48" title="Edit section: Polymorphic wrappers for function objects"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Type_polymorphism" class="mw-redirect" title="Type polymorphism">Polymorphic</a> <a href="/wiki/Adapter_pattern" title="Adapter pattern">wrappers</a> for <a href="/wiki/Function_object" title="Function object">function objects</a> are similar to <a href="/wiki/Function_pointer" title="Function pointer">function pointers</a> in semantics and syntax, but are less tightly bound and can indiscriminately refer to anything which can be called (function pointers, member function pointers, or functors) whose arguments are compatible with those of the wrapper. </p><p>An example can clarify its characteristics: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">function</span><span class="o">&lt;</span><span class="kt">int</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="p">)</span><span class="o">&gt;</span><span class="w"> </span><span class="n">func</span><span class="p">;</span><span class="w"> </span><span class="c1">// Wrapper creation using</span> <span class="w"> </span><span class="c1">// template class &#39;function&#39;.</span> <span class="n">std</span><span class="o">::</span><span class="n">plus</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="w"> </span><span class="n">add</span><span class="p">;</span><span class="w"> </span><span class="c1">// &#39;plus&#39; is declared as &#39;template&lt;class T&gt; T plus( T, T )&#160;;&#39;</span> <span class="w"> </span><span class="c1">// then &#39;add&#39; is type &#39;int add( int x, int y )&#39;.</span> <span class="n">func</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">add</span><span class="p">;</span><span class="w"> </span><span class="c1">// OK - Parameters and return types are the same.</span> <span class="kt">int</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">func</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span><span class="w"> </span><span class="c1">// NOTE: if the wrapper &#39;func&#39; does not refer to any function,</span> <span class="w"> </span><span class="c1">// the exception &#39;std::bad_function_call&#39; is thrown.</span> <span class="n">std</span><span class="o">::</span><span class="n">function</span><span class="o">&lt;</span><span class="kt">bool</span><span class="w"> </span><span class="p">(</span><span class="kt">short</span><span class="p">,</span><span class="w"> </span><span class="kt">short</span><span class="p">)</span><span class="o">&gt;</span><span class="w"> </span><span class="n">func2</span><span class="w"> </span><span class="p">;</span> <span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">func2</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="c1">// True because &#39;func2&#39; has not yet been assigned a function.</span> <span class="w"> </span><span class="kt">bool</span><span class="w"> </span><span class="nf">adjacent</span><span class="p">(</span><span class="kt">long</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="n">y</span><span class="p">);</span> <span class="w"> </span><span class="n">func2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="n">adjacent</span><span class="p">;</span><span class="w"> </span><span class="c1">// OK - Parameters and return types are convertible.</span> <span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">Test</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="kt">bool</span><span class="w"> </span><span class="nf">operator</span><span class="p">()(</span><span class="kt">short</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="kt">short</span><span class="w"> </span><span class="n">y</span><span class="p">);</span> <span class="w"> </span><span class="p">};</span> <span class="w"> </span><span class="n">Test</span><span class="w"> </span><span class="n">car</span><span class="p">;</span> <span class="w"> </span><span class="n">func</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">ref</span><span class="p">(</span><span class="n">car</span><span class="p">);</span><span class="w"> </span><span class="c1">// &#39;std::ref&#39; is a template function that returns the wrapper</span> <span class="w"> </span><span class="c1">// of member function &#39;operator()&#39; of struct &#39;car&#39;.</span> <span class="p">}</span> <span class="n">func</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">func2</span><span class="p">;</span><span class="w"> </span><span class="c1">// OK - Parameters and return types are convertible.</span> </pre></div> <p>The template class <code>function</code> was defined inside the header <code>&lt;functional&gt;</code>, without needing any change to the C++ language. </p> <div class="mw-heading mw-heading3"><h3 id="Type_traits_for_metaprogramming">Type traits for metaprogramming</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=49" title="Edit section: Type traits for metaprogramming"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Metaprogramming" title="Metaprogramming">Metaprogramming</a> consists of creating a program that creates or modifies another program (or itself). This can happen during compilation or during execution. The <a href="/wiki/ISO/IEC_JTC_1/SC_22" title="ISO/IEC JTC 1/SC 22">C++ Standards Committee</a> has decided to introduce a library for metaprogramming during compiling via templates. </p><p>Here is an example of a meta-program using the C++03 standard: a <a href="/wiki/Recursion" title="Recursion">recursion</a> of template instances for calculating integer exponents: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">template</span><span class="o">&lt;</span><span class="kt">int</span><span class="w"> </span><span class="n">B</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">N</span><span class="o">&gt;</span> <span class="k">struct</span><span class="w"> </span><span class="nc">Pow</span> <span class="p">{</span> <span class="w"> </span><span class="c1">// recursive call and recombination.</span> <span class="w"> </span><span class="k">enum</span><span class="p">{</span><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">B</span><span class="o">*</span><span class="n">Pow</span><span class="o">&lt;</span><span class="n">B</span><span class="p">,</span><span class="w"> </span><span class="n">N</span><span class="mi">-1</span><span class="o">&gt;::</span><span class="n">value</span><span class="w"> </span><span class="p">};</span> <span class="p">};</span> <span class="k">template</span><span class="o">&lt;</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">B</span><span class="w"> </span><span class="o">&gt;</span> <span class="k">struct</span><span class="w"> </span><span class="nc">Pow</span><span class="o">&lt;</span><span class="n">B</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="o">&gt;</span> <span class="p">{</span> <span class="w"> </span><span class="c1">// &#39;&#39;N == 0&#39;&#39; condition of termination.</span> <span class="w"> </span><span class="k">enum</span><span class="p">{</span><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="p">};</span> <span class="p">};</span> <span class="kt">int</span><span class="w"> </span><span class="n">quartic_of_three</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Pow</span><span class="o">&lt;</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="o">&gt;::</span><span class="n">value</span><span class="p">;</span> </pre></div> <p>Many algorithms can operate on different types of data; C++'s <a href="/wiki/Template_(programming)" class="mw-redirect" title="Template (programming)">templates</a> support <a href="/wiki/Generic_programming" title="Generic programming">generic programming</a> and make code more compact and useful. Nevertheless, it is common for algorithms to need information on the data types being used. This information can be extracted during instantiation of a template class using <i>type traits</i>. </p><p><i>Type traits</i> can identify the category of an object and all the characteristics of a class (or of a struct). They are defined in the new header <code>&lt;type_traits&gt;</code>. </p><p>In the next example there is the template function ‘elaborate’ which, depending on the given data types, will instantiate one of the two proposed algorithms (<code>Algorithm::do_it</code>). </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">// First way of operating.</span> <span class="k">template</span><span class="o">&lt;</span><span class="w"> </span><span class="kt">bool</span><span class="w"> </span><span class="n">B</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">Algorithm</span> <span class="p">{</span> <span class="w"> </span><span class="k">template</span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">T1</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">T2</span><span class="o">&gt;</span><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">do_it</span><span class="w"> </span><span class="p">(</span><span class="n">T1</span><span class="w"> </span><span class="o">&amp;</span><span class="p">,</span><span class="w"> </span><span class="n">T2</span><span class="w"> </span><span class="o">&amp;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/*...*/</span><span class="w"> </span><span class="p">}</span> <span class="p">};</span> <span class="c1">// Second way of operating.</span> <span class="k">template</span><span class="o">&lt;&gt;</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">Algorithm</span><span class="o">&lt;</span><span class="nb">true</span><span class="o">&gt;</span> <span class="p">{</span> <span class="w"> </span><span class="k">template</span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">T1</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">T2</span><span class="o">&gt;</span><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">do_it</span><span class="w"> </span><span class="p">(</span><span class="n">T1</span><span class="p">,</span><span class="w"> </span><span class="n">T2</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/*...*/</span><span class="w"> </span><span class="p">}</span> <span class="p">};</span> <span class="c1">// Instantiating &#39;elaborate&#39; will automatically instantiate the correct way to operate.</span> <span class="k">template</span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">T1</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">T2</span><span class="o">&gt;</span> <span class="kt">int</span><span class="w"> </span><span class="n">elaborate</span><span class="w"> </span><span class="p">(</span><span class="n">T1</span><span class="w"> </span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="n">T2</span><span class="w"> </span><span class="n">B</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="c1">// Use the second way only if &#39;T1&#39; is an integer and if &#39;T2&#39; is</span> <span class="w"> </span><span class="c1">// in floating point, otherwise use the first way.</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">Algorithm</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">is_integral</span><span class="o">&lt;</span><span class="n">T1</span><span class="o">&gt;::</span><span class="n">value</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">is_floating_point</span><span class="o">&lt;</span><span class="n">T2</span><span class="o">&gt;::</span><span class="n">value</span><span class="o">&gt;::</span><span class="n">do_it</span><span class="p">(</span><span class="w"> </span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="n">B</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">;</span> <span class="p">}</span> </pre></div> <p>Via <i>type traits</i>, defined in header <code>&lt;type_traits&gt;</code>, it's also possible to create type transformation operations (<code>static_cast</code> and <code>const_cast</code> are insufficient inside a template). </p><p>This type of programming produces elegant and concise code; however, the weak point of these techniques is the debugging: it's uncomfortable during compilation and very difficult during program execution. </p> <div class="mw-heading mw-heading3"><h3 id="Uniform_method_for_computing_the_return_type_of_function_objects">Uniform method for computing the return type of function objects</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=50" title="Edit section: Uniform method for computing the return type of function objects"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Determining the return type of a template function object at compile-time is not intuitive, particularly if the return value depends on the parameters of the function. As an example: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">Clear</span> <span class="p">{</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="nf">operator</span><span class="p">()(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span><span class="w"> </span><span class="c1">// The parameter type is</span> <span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="nf">operator</span><span class="p">()(</span><span class="kt">double</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span><span class="w"> </span><span class="c1">// equal to the return type.</span> <span class="p">};</span> <span class="k">template</span><span class="w"> </span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">Obj</span><span class="o">&gt;</span> <span class="k">class</span><span class="w"> </span><span class="nc">Calculus</span> <span class="p">{</span> <span class="k">public</span><span class="o">:</span> <span class="w"> </span><span class="k">template</span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">Arg</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Arg</span><span class="w"> </span><span class="k">operator</span><span class="p">()(</span><span class="n">Arg</span><span class="o">&amp;</span><span class="w"> </span><span class="n">a</span><span class="p">)</span><span class="w"> </span><span class="k">const</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">member</span><span class="p">(</span><span class="n">a</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="k">private</span><span class="o">:</span> <span class="w"> </span><span class="n">Obj</span><span class="w"> </span><span class="n">member</span><span class="p">;</span> <span class="p">};</span> </pre></div> <p>Instantiating the class template <code>Calculus&lt;Clear&gt;</code>, the function object of <code>calculus</code> will have always the same return type as the function object of <code>Clear</code>. However, given class <code>Confused</code> below: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">Confused</span> <span class="p">{</span> <span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="nf">operator</span><span class="p">()(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span><span class="w"> </span><span class="c1">// The parameter type is not</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="nf">operator</span><span class="p">()(</span><span class="kt">double</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span><span class="w"> </span><span class="c1">// equal to the return type.</span> <span class="p">};</span> </pre></div> <p>Attempting to instantiate <code>Calculus&lt;Confused&gt;</code> will cause the return type of <code>Calculus</code> to not be the same as that of class <code>Confused</code>. The compiler may generate warnings about the conversion from <code>int</code> to <code>double</code> and vice versa. </p><p>TR1 introduces, and C++11 adopts, the template class <code>std::result_of</code> that allows one to determine and use the return type of a function object for every declaration. The object <code>CalculusVer2</code> uses the <code>std::result_of</code> object to derive the return type of the function object: </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="k">template</span><span class="o">&lt;</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">Obj</span><span class="w"> </span><span class="o">&gt;</span> <span class="k">class</span><span class="w"> </span><span class="nc">CalculusVer2</span> <span class="p">{</span> <span class="k">public</span><span class="o">:</span> <span class="w"> </span><span class="k">template</span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">Arg</span><span class="o">&gt;</span> <span class="w"> </span><span class="k">typename</span><span class="w"> </span><span class="nc">std</span><span class="o">::</span><span class="n">result_of</span><span class="o">&lt;</span><span class="n">Obj</span><span class="p">(</span><span class="n">Arg</span><span class="p">)</span><span class="o">&gt;::</span><span class="n">type</span><span class="w"> </span><span class="k">operator</span><span class="p">()(</span><span class="n">Arg</span><span class="o">&amp;</span><span class="w"> </span><span class="n">a</span><span class="p">)</span><span class="w"> </span><span class="k">const</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">member</span><span class="p">(</span><span class="n">a</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="k">private</span><span class="o">:</span> <span class="w"> </span><span class="n">Obj</span><span class="w"> </span><span class="n">member</span><span class="p">;</span> <span class="p">};</span> </pre></div> <p>In this way in instances of function object of <code>CalculusVer2&lt;Confused&gt;</code> there are no conversions, warnings, or errors. </p><p>The only change from the TR1 version of <code>std::result_of</code> is that the TR1 version allowed an implementation to fail to be able to determine the result type of a function call. Due to changes to C++ for supporting <code><a href="#Type_inference">decltype</a></code>, the C++11 version of <code>std::result_of</code> no longer needs these special cases; implementations are required to compute a type in all cases. </p> <div class="mw-heading mw-heading2"><h2 id="Improved_C_compatibility">Improved C compatibility</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=51" title="Edit section: Improved C compatibility"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For compatibility with <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a>, from C99, these were added:<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">&#91;</span>26<span class="cite-bracket">&#93;</span></a></sup> </p> <ul><li>Preprocessor:<sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">&#91;</span>27<span class="cite-bracket">&#93;</span></a></sup> <ul><li><a href="/wiki/Variadic_macro" class="mw-redirect" title="Variadic macro">variadic macros</a>,</li> <li>concatenation of adjacent narrow/wide string literals,</li> <li><code>_Pragma()</code> – equivalent of <code>#pragma</code>.</li></ul></li> <li><code>long long</code> – integer type that is at least 64 bits long.</li> <li><code>__func__</code> – macro evaluating to the name of the function it is in.</li> <li>Headers: <ul><li><code>cstdbool</code> (<code>stdbool.h</code>),</li> <li><code>cstdint</code> (<code>stdint.h</code>),</li> <li><code>cinttypes</code> (<code>inttypes.h</code>).</li></ul></li></ul> <div class="mw-heading mw-heading2"><h2 id="Features_originally_planned_but_removed_or_not_included">Features originally planned but removed or not included</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=52" title="Edit section: Features originally planned but removed or not included"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Heading for a separate TR: </p> <ul><li><a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3347.pdf">Modules</a></li> <li>Decimal types</li> <li>Math special functions</li></ul> <p>Postponed: </p> <ul><li><a href="/wiki/Concepts_(C%2B%2B)" title="Concepts (C++)">Concepts</a></li> <li>More complete or required garbage collection support</li> <li>Reflection</li> <li>Macro scopes</li></ul> <div class="mw-heading mw-heading2"><h2 id="Features_removed_or_deprecated">Features removed or deprecated</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=53" title="Edit section: Features removed or deprecated"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The term <a href="/wiki/Sequence_point" title="Sequence point">sequence point</a> was removed, being replaced by specifying that either one operation is sequenced before another, or that two operations are unsequenced.<sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">&#91;</span>28<span class="cite-bracket">&#93;</span></a></sup> </p><p>The former use of the keyword <code><a href="/w/index.php?title=Export_(C%2B%2B)&amp;action=edit&amp;redlink=1" class="new" title="Export (C++) (page does not exist)">export</a></code> was removed.<sup id="cite_ref-sutter0310_29-0" class="reference"><a href="#cite_note-sutter0310-29"><span class="cite-bracket">&#91;</span>29<span class="cite-bracket">&#93;</span></a></sup> The keyword itself remains, being reserved for potential future use. </p><p>Dynamic <a href="/wiki/Exception_specification" class="mw-redirect" title="Exception specification">exception specifications</a> are deprecated.<sup id="cite_ref-sutter0310_29-1" class="reference"><a href="#cite_note-sutter0310-29"><span class="cite-bracket">&#91;</span>29<span class="cite-bracket">&#93;</span></a></sup> Compile-time specification of non-exception-throwing functions is available with the <code>noexcept</code> keyword, which is useful for optimization. </p><p><code><a href="/wiki/Auto_ptr" title="Auto ptr">std::auto_ptr</a></code> is deprecated, having been superseded by <code>std::unique_ptr</code>. </p><p>Function object base classes (<code>std::unary_function</code>, <code>std::binary_function</code>), adapters to pointers to functions and adapters to pointers to members, and binder classes are all deprecated. </p> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=54" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/C11_(C_standard_revision)" title="C11 (C standard revision)">C11</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=55" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap mw-references-columns"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://herbsutter.com/2011/08/12/we-have-an-international-standard-c0x-is-unanimously-approved/">"We have an international standard: C++0x is unanimously approved"</a>. 12 August 2011. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20181211080242/http://herbsutter.com/2011/08/12/we-have-an-international-standard-c0x-is-unanimously-approved/">Archived</a> from the original on 11 December 2018<span class="reference-accessdate">. Retrieved <span class="nowrap">12 August</span> 2011</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=We+have+an+international+standard%3A+C%2B%2B0x+is+unanimously+approved&amp;rft.date=2011-08-12&amp;rft_id=http%3A%2F%2Fherbsutter.com%2F2011%2F08%2F12%2Fwe-have-an-international-standard-c0x-is-unanimously-approved%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-:0-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-:0_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:0_2-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFStroustrup" class="citation web cs1">Stroustrup, Bjarne. <a rel="nofollow" class="external text" href="http://www.stroustrup.com/C++11FAQ.html">"C++11 FAQ"</a>. <i>stroustrup.com</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20181006014513/http://www.stroustrup.com/C++11FAQ.html">Archived</a> from the original on 2018-10-06<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-10-15</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=stroustrup.com&amp;rft.atitle=C%2B%2B11+FAQ&amp;rft.aulast=Stroustrup&amp;rft.aufirst=Bjarne&amp;rft_id=http%3A%2F%2Fwww.stroustrup.com%2FC%2B%2B11FAQ.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-:1-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-:1_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:1_3-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://isocpp.org/wiki/faq/cpp11#cpp11-specific-goals">"C++11 Overview: What specific design goals guided the committee?"</a>. <i>Standard C++</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20190131050050/https://isocpp.org/wiki/faq/cpp11#cpp11-specific-goals">Archived</a> from the original on 2019-01-31<span class="reference-accessdate">. Retrieved <span class="nowrap">2015-09-04</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Standard+C%2B%2B&amp;rft.atitle=C%2B%2B11+Overview%3A+What+specific+design+goals+guided+the+committee%3F&amp;rft_id=https%3A%2F%2Fisocpp.org%2Fwiki%2Ffaq%2Fcpp11%23cpp11-specific-goals&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.research.ibm.com/arl/seminar/media/stroustrup.pdf">"Bjarne Stroustrup: A C++0x overview"</a> <span class="cs1-format">(PDF)</span>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20160617024131/https://www.research.ibm.com/arl/seminar/media/stroustrup.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 17 June 2016<span class="reference-accessdate">. Retrieved <span class="nowrap">30 June</span> 2011</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Bjarne+Stroustrup%3A+A+C%2B%2B0x+overview&amp;rft_id=https%3A%2F%2Fwww.research.ibm.com%2Farl%2Fseminar%2Fmedia%2Fstroustrup.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372">"ISO/IEC 14882:2011"</a>. ISO. 2 September 2011. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20130129110331/http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372">Archived</a> from the original on 29 January 2013<span class="reference-accessdate">. Retrieved <span class="nowrap">3 September</span> 2011</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=ISO%2FIEC+14882%3A2011&amp;rft.pub=ISO&amp;rft.date=2011-09-02&amp;rft_id=http%3A%2F%2Fwww.iso.org%2Fiso%2Fiso_catalogue%2Fcatalogue_tc%2Fcatalogue_detail.htm%3Fcsnumber%3D50372&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf">"Working Draft, Standard for Programming Language C++"</a> <span class="cs1-format">(PDF)</span>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20190121141340/http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2019-01-21<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-04-26</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Working+Draft%2C+Standard+for+Programming+Language+C%2B%2B&amp;rft_id=http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2012%2Fn3337.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://isocpp.org/std/the-standard">"The Standard"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20190513104847/https://isocpp.org/std/the-standard">Archived</a> from the original on 2019-05-13<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-11-02</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=The+Standard&amp;rft_id=http%3A%2F%2Fisocpp.org%2Fstd%2Fthe-standard&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20231129221013/https://clang.llvm.org/cxx_status.html">"Clang - C++ Programming Language Status"</a>. 2023-11-29. Archived from <a rel="nofollow" class="external text" href="https://clang.llvm.org/cxx_status.html">the original</a> on 2023-11-29<span class="reference-accessdate">. Retrieved <span class="nowrap">2023-12-01</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Clang+-+C%2B%2B+Programming+Language+Status&amp;rft.date=2023-11-29&amp;rft_id=https%3A%2F%2Fclang.llvm.org%2Fcxx_status.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://isocpp.org/blog/2013/05/gcc-4.8.1-released-c11-feature-complete">"GCC 4.8.1 released, C++11 feature complete: Standard C++"</a>. <i>isocpp.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-12-01</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=isocpp.org&amp;rft.atitle=GCC+4.8.1+released%2C+C%2B%2B11+feature+complete%3A+Standard+C%2B%2B&amp;rft_id=https%3A%2F%2Fisocpp.org%2Fblog%2F2013%2F05%2Fgcc-4.8.1-released-c11-feature-complete&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-Sutter_Alexandrescu-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-Sutter_Alexandrescu_10-0">^</a></b></span> <span class="reference-text">Sutter, Alexandrescu "C++ coding standards" #15</span> </li> <li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGabriel_Dos_ReisBjarne_Stroustrup2010" class="citation web cs1">Gabriel Dos Reis; Bjarne Stroustrup (22 March 2010). <a rel="nofollow" class="external text" href="http://www.stroustrup.com/sac10-constexpr.pdf">"General Constant Expressions for System Programming Languages, Proceedings SAC '10"</a> <span class="cs1-format">(PDF)</span>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180613125602/http://www.stroustrup.com/sac10-constexpr.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 13 June 2018<span class="reference-accessdate">. Retrieved <span class="nowrap">18 August</span> 2012</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=General+Constant+Expressions+for+System+Programming+Languages%2C+Proceedings+SAC+%2710&amp;rft.date=2010-03-22&amp;rft.au=Gabriel+Dos+Reis&amp;rft.au=Bjarne+Stroustrup&amp;rft_id=http%3A%2F%2Fwww.stroustrup.com%2Fsac10-constexpr.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFJaakko_JärviBjarne_StroustrupDouglas_GregorJeremy_Siek2003" class="citation web cs1">Jaakko Järvi; Bjarne Stroustrup; Douglas Gregor; Jeremy Siek (April 28, 2003). <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1478.pdf">"Decltype and auto, Programming Language C++, Document no: N1478=03-0061"</a> <span class="cs1-format">(PDF)</span>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20150528112722/http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1478.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on May 28, 2015<span class="reference-accessdate">. Retrieved <span class="nowrap">June 6,</span> 2015</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Decltype+and+auto%2C+Programming+Language+C%2B%2B%2C+Document+no%3A+N1478%3D03-0061&amp;rft.date=2003-04-28&amp;rft.au=Jaakko+J%C3%A4rvi&amp;rft.au=Bjarne+Stroustrup&amp;rft.au=Douglas+Gregor&amp;rft.au=Jeremy+Siek&amp;rft_id=http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2003%2Fn1478.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRoger_Orr2013" class="citation web cs1">Roger Orr (June 2013). <a rel="nofollow" class="external text" href="http://accu.org/index.php/journals/1859">"<span class="cs1-kern-left"></span>"Auto – A Necessary Evil?" Overload Journal #115"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20150606155637/http://accu.org/index.php/journals/1859">Archived</a> from the original on 2015-06-06<span class="reference-accessdate">. Retrieved <span class="nowrap">2015-06-06</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=%22Auto+%E2%80%93+A+Necessary+Evil%3F%22+Overload+Journal+%23115&amp;rft.date=2013-06&amp;rft.au=Roger+Orr&amp;rft_id=http%3A%2F%2Faccu.org%2Findex.php%2Fjournals%2F1859&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1968.pdf">"Document no: N1968=06-0038- Lambda expressions and closures for C++"</a> <span class="cs1-format">(PDF)</span>. Open Standards. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20110728051114/http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1968.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2011-07-28<span class="reference-accessdate">. Retrieved <span class="nowrap">2009-04-20</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Document+no%3A+N1968%3D06-0038-+Lambda+expressions+and+closures+for+C%2B%2B&amp;rft.pub=Open+Standards&amp;rft_id=http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2006%2Fn1968.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1978.pdf">"Decltype (revision 5)"</a> <span class="cs1-format">(PDF)</span>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20220214133743/http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2006/n1978.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2022-02-14<span class="reference-accessdate">. Retrieved <span class="nowrap">2022-02-16</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Decltype+%28revision+5%29&amp;rft_id=http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2006%2Fn1978.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://en.cppreference.com/w/cpp/language/auto">"auto specifier (since C++11) - cppreference.com"</a>. <i>en.cppreference.com</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20161020050910/http://en.cppreference.com/w/cpp/language/auto">Archived</a> from the original on 2016-10-20<span class="reference-accessdate">. Retrieved <span class="nowrap">2016-10-18</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=en.cppreference.com&amp;rft.atitle=auto+specifier+%28since+C%2B%2B11%29+-+cppreference.com&amp;rft_id=http%3A%2F%2Fen.cppreference.com%2Fw%2Fcpp%2Flanguage%2Fauto&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGustedt2019" class="citation journal cs1">Gustedt, Jens (2019-07-09). <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2394.pdf">"Introduce the nullptr constant - v1"</a> <span class="cs1-format">(PDF)</span>. <i>ISO JTC1/SC22/WG14 Document Register</i>. International Organization for Standardization. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200727055706/http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2394.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-07-27<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-04-19</span></span> &#8211; via open-std.org.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=ISO+JTC1%2FSC22%2FWG14+Document+Register&amp;rft.atitle=Introduce+the+nullptr+constant+-+v1&amp;rft.date=2019-07-09&amp;rft.aulast=Gustedt&amp;rft.aufirst=Jens&amp;rft_id=http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg14%2Fwww%2Fdocs%2Fn2394.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text">This caused a conflict with the proposed use (common in other languages) of the underscore for <a href="/wiki/Digit_grouping" class="mw-redirect" title="Digit grouping">digit grouping</a> in numeric literals such as <a href="/wiki/Integer_literal" title="Integer literal">integer literals</a>, so <a href="/wiki/C%2B%2B14" title="C++14">C++14</a> instead uses the apostrophe (as an <a href="/wiki/Upper_comma" class="mw-redirect" title="Upper comma">upper comma</a>) for grouping.<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFDaveed_Vandevoorde2012" class="citation web cs1">Daveed Vandevoorde (2012-09-21). <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3448.pdf">"N3448: Painless Digit Separation"</a> <span class="cs1-format">(PDF)</span>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20150811140211/http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3448.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2015-08-11<span class="reference-accessdate">. Retrieved <span class="nowrap">2015-08-13</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=N3448%3A+Painless+Digit+Separation&amp;rft.date=2012-09-21&amp;rft.au=Daveed+Vandevoorde&amp;rft_id=http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2012%2Fn3448.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFLawrence_Crowl2012" class="citation web cs1">Lawrence Crowl (2012-12-19). <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3499.html">"N3499: Digit Separators"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20150811114700/http://open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3499.html">Archived</a> from the original on 2015-08-11<span class="reference-accessdate">. Retrieved <span class="nowrap">2015-08-13</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=N3499%3A+Digit+Separators&amp;rft.date=2012-12-19&amp;rft.au=Lawrence+Crowl&amp;rft_id=http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2013%2Fn3499.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-C++03_3.2/3-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-C++03_3.2/3_19-0">^</a></b></span> <span class="reference-text"><a href="/wiki/International_Organization_for_Standardization" title="International Organization for Standardization">ISO</a>/<a href="/wiki/International_Electrotechnical_Commission" title="International Electrotechnical Commission">IEC</a> (2003). <i><a href="/wiki/ISO/IEC_14882" class="mw-redirect" title="ISO/IEC 14882">ISO/IEC 14882</a>:2003(E): Programming Languages – C++ §3.2 One definition rule [basic.def.odr]</i> para. 3</span> </li> <li id="cite_note-openstd_default_delete-20"><span class="mw-cite-backlink">^ <a href="#cite_ref-openstd_default_delete_20-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-openstd_default_delete_20-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2210.html#%22default%22">"Defaulted and Deleted Functions – ISO/IEC JTC1 SC22 WG21 N2210 = 07-0070 – 2007-03-11"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20120819182910/http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2210.html#%22default%22">Archived</a> from the original on 2012-08-19<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-12-20</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Defaulted+and+Deleted+Functions+%E2%80%93+ISO%2FIEC+JTC1+SC22+WG21+N2210+%3D+07-0070+%E2%80%93+2007-03-11&amp;rft_id=http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2007%2Fn2210.html%23%2522default%2522&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://gcc.gnu.org/onlinedocs/gcc/Long-Long.html">"Using the GNU Compiler Collection (GCC): Long Long"</a>. <i>gcc.gnu.org</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20160821113233/http://gcc.gnu.org/onlinedocs/gcc/Long-Long.html">Archived</a> from the original on 2016-08-21<span class="reference-accessdate">. Retrieved <span class="nowrap">2016-07-25</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=gcc.gnu.org&amp;rft.atitle=Using+the+GNU+Compiler+Collection+%28GCC%29%3A+Long+Long&amp;rft_id=https%3A%2F%2Fgcc.gnu.org%2Fonlinedocs%2Fgcc%2FLong-Long.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/s3f49ktz(VS.80).aspx">"Data Type Ranges (C++)"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20090221114127/http://msdn.microsoft.com/en-us/library/s3f49ktz(VS.80).aspx">Archived</a> from the original on 2009-02-21<span class="reference-accessdate">. Retrieved <span class="nowrap">2009-04-23</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Data+Type+Ranges+%28C%2B%2B%29&amp;rft_id=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fs3f49ktz%28VS.80%29.aspx&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text">Samuel P. Harbison III, Guy L. Steele Jr.: "C – A Reference Manual", 5th edition, p.251</span> </li> <li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMilewski2009" class="citation web cs1">Milewski, Bartosz (3 March 2009). <a rel="nofollow" class="external text" href="http://bartoszmilewski.wordpress.com/2009/03/03/broken-promises-c0x-futures/">"Broken promises–C++0x futures"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20110916155404/http://bartoszmilewski.wordpress.com/2009/03/03/broken-promises-c0x-futures/">Archived</a> from the original on 16 September 2011<span class="reference-accessdate">. Retrieved <span class="nowrap">24 January</span> 2010</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Broken+promises%E2%80%93C%2B%2B0x+futures&amp;rft.date=2009-03-03&amp;rft.aulast=Milewski&amp;rft.aufirst=Bartosz&amp;rft_id=http%3A%2F%2Fbartoszmilewski.wordpress.com%2F2009%2F03%2F03%2Fbroken-promises-c0x-futures%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-25">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://en.cppreference.com/w/cpp/regex">"C++ Regular expressions library"</a>. <i>cppreference.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">10 December</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=cppreference.com&amp;rft.atitle=C%2B%2B+Regular+expressions+library&amp;rft_id=https%3A%2F%2Fen.cppreference.com%2Fw%2Fcpp%2Fregex&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://clang.llvm.org/cxx_status.html">"Clang - C++98, C++11, and C++14 Status"</a>. Clang.llvm.org. 2013-05-12. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20190528214038/http://clang.llvm.org/cxx_status.html">Archived</a> from the original on 2019-05-28<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-06-10</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Clang+-+C%2B%2B98%2C+C%2B%2B11%2C+and+C%2B%2B14+Status&amp;rft.pub=Clang.llvm.org&amp;rft.date=2013-05-12&amp;rft_id=http%3A%2F%2Fclang.llvm.org%2Fcxx_status.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm">"Working draft changes for C99 preprocessor synchronization"</a>. <i>www.open-std.org</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200731222757/http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm">Archived</a> from the original on 2020-07-31<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-05-26</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=www.open-std.org&amp;rft.atitle=Working+draft+changes+for+C99+preprocessor+synchronization&amp;rft_id=http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2004%2Fn1653.htm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCaves2007" class="citation web cs1">Caves, Jonathan (4 June 2007). <a rel="nofollow" class="external text" href="http://blogs.msdn.com/b/vcblog/archive/2007/06/04/update-on-the-c-0x-language-standard.aspx">"Update on the C++-0x Language Standard"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20110909141628/http://blogs.msdn.com/b/vcblog/archive/2007/06/04/update-on-the-c-0x-language-standard.aspx">Archived</a> from the original on 9 September 2011<span class="reference-accessdate">. Retrieved <span class="nowrap">25 May</span> 2010</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Update+on+the+C%2B%2B-0x+Language+Standard&amp;rft.date=2007-06-04&amp;rft.aulast=Caves&amp;rft.aufirst=Jonathan&amp;rft_id=http%3A%2F%2Fblogs.msdn.com%2Fb%2Fvcblog%2Farchive%2F2007%2F06%2F04%2Fupdate-on-the-c-0x-language-standard.aspx&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> <li id="cite_note-sutter0310-29"><span class="mw-cite-backlink">^ <a href="#cite_ref-sutter0310_29-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-sutter0310_29-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFSutter2010" class="citation web cs1"><a href="/wiki/Herb_Sutter" title="Herb Sutter">Sutter, Herb</a> (3 March 2010). <a rel="nofollow" class="external text" href="http://herbsutter.com/2010/03/13/trip-report-march-2010-iso-c-standards-meeting/">"Trip Report: March 2010 ISO C++ Standards Meeting"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180711064254/https://herbsutter.com/2010/03/13/trip-report-march-2010-iso-c-standards-meeting/">Archived</a> from the original on 11 July 2018<span class="reference-accessdate">. Retrieved <span class="nowrap">24 March</span> 2010</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Trip+Report%3A+March+2010+ISO+C%2B%2B+Standards+Meeting&amp;rft.date=2010-03-03&amp;rft.aulast=Sutter&amp;rft.aufirst=Herb&amp;rft_id=http%3A%2F%2Fherbsutter.com%2F2010%2F03%2F13%2Ftrip-report-march-2010-iso-c-standards-meeting%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AC%2B%2B11" class="Z3988"></span></span> </li> </ol></div></div> <div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&amp;action=edit&amp;section=56" title="Edit section: External links"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1251242444"><table class="box-External_links plainlinks metadata ambox ambox-style ambox-external_links" role="presentation"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/f/f2/Edit-clear.svg/40px-Edit-clear.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/f/f2/Edit-clear.svg/60px-Edit-clear.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/f/f2/Edit-clear.svg/80px-Edit-clear.svg.png 2x" data-file-width="48" data-file-height="48" /></span></span></div></td><td class="mbox-text"><div class="mbox-text-span">This section's <b>use of <a href="/wiki/Wikipedia:External_links" title="Wikipedia:External links">external links</a> may not follow Wikipedia's policies or guidelines</b>.<span class="hide-when-compact"> Please <a class="external text" href="https://en.wikipedia.org/w/index.php?title=C%2B%2B11&amp;action=edit">improve this article</a> by removing <a href="/wiki/Wikipedia:What_Wikipedia_is_not#Wikipedia_is_not_a_mirror_or_a_repository_of_links,_images,_or_media_files" title="Wikipedia:What Wikipedia is not">excessive</a> or <a href="/wiki/Wikipedia:External_links" title="Wikipedia:External links">inappropriate</a> external links, and converting useful links where appropriate into <a href="/wiki/Wikipedia:Citing_sources" title="Wikipedia:Citing sources">footnote references</a>.</span> <span class="date-container"><i>(<span class="date">October 2018</span>)</i></span><span class="hide-when-compact"><i> (<small><a href="/wiki/Help:Maintenance_template_removal" title="Help:Maintenance template removal">Learn how and when to remove this message</a></small>)</i></span></div></td></tr></tbody></table> <ul><li><a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/">The C++ Standards Committee</a></li> <li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20080221185141/http://www.informit.com/guides/content.aspx?g=cplusplus&amp;seqNum=216">C++0X: The New Face of Standard C++</a></li> <li><a rel="nofollow" class="external text" href="http://herbsutter.wordpress.com/">Herb Sutter's blog coverage of C++11</a></li> <li><a rel="nofollow" class="external text" href="http://www.justsoftwaresolutions.co.uk/cplusplus/">Anthony Williams' blog coverage of C++11</a></li> <li><a rel="nofollow" class="external text" href="http://www.csclub.uwaterloo.ca/media/C++0x%20-%20An%20Overview.html">A talk on C++0x given by Bjarne Stroustrup at the University of Waterloo</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20090123171916/http://www.csclub.uwaterloo.ca/media/C++0x%20-%20An%20Overview.html">Archived</a> 2009-01-23 at the <a href="/wiki/Wayback_Machine" title="Wayback Machine">Wayback Machine</a></li> <li><a rel="nofollow" class="external text" href="http://www.devx.com/SpecialReports/Article/38813/0/page/1">The State of the Language: An Interview with Bjarne Stroustrup (15 August 2008)</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20090131065906/http://www.devx.com/SpecialReports/Article/38813/0/page/1">Archived</a> 31 January 2009 at the <a href="/wiki/Wayback_Machine" title="Wayback Machine">Wayback Machine</a></li> <li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20120520004525/http://wiki.apache.org/stdcxx/C++0xCompilerSupport">Wiki page to help keep track of C++ 0x core language features and their availability in compilers</a></li> <li><a rel="nofollow" class="external text" href="http://en.cppreference.com">Online C++11 standard library reference</a></li> <li><a rel="nofollow" class="external text" href="http://stacked-crooked.com/">Online C++11 compiler</a></li> <li>Bjarne Stroustrup's <a rel="nofollow" class="external text" href="http://www.stroustrup.com/C++11FAQ.html">C++11 FAQ</a></li> <li><a rel="nofollow" class="external text" href="https://corecplusplustutorial.com">More information on C++11 features:range-based for loop,why auto_ptr is deprecated,etc. </a></li></ul> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><style data-mw-deduplicate="TemplateStyles:r1236075235">.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}</style></div><div role="navigation" class="navbox" aria-labelledby="C++" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239400231"><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:C%2B%2B_programming_language" title="Template:C++ programming language"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:C%2B%2B_programming_language" title="Template talk:C++ programming language"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:C%2B%2B_programming_language" title="Special:EditPage/Template:C++ programming language"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="C++" style="font-size:114%;margin:0 4em"><a href="/wiki/C%2B%2B" title="C++">C++</a></div></th></tr><tr><td class="navbox-abovebelow" colspan="2"><div> <ul><li><a href="/wiki/C%2B%2B" title="C++">C++</a></li> <li><a href="/wiki/Outline_of_C%2B%2B" title="Outline of C++">Outline</a></li> <li><a href="/wiki/C%2B%2B#Standardization" title="C++">C++98</a></li> <li><a href="/wiki/C%2B%2B03" title="C++03">C++03</a></li> <li><a class="mw-selflink selflink">C++11</a></li> <li><a href="/wiki/C%2B%2B14" title="C++14">C++14</a></li> <li><a href="/wiki/C%2B%2B17" title="C++17">C++17</a></li> <li><a href="/wiki/C%2B%2B20" title="C++20">C++20</a></li> <li><a href="/wiki/C%2B%2B23" title="C++23">C++23</a></li> <li><a href="/wiki/C%2B%2B26" title="C++26">C++26</a></li> <li><a href="/wiki/Category:C%2B%2B_libraries" title="Category:C++ libraries">Libraries</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Features</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/C%2B%2B_classes" title="C++ classes">Classes</a></li> <li><a href="/wiki/Concepts_(C%2B%2B)" title="Concepts (C++)">Concepts</a></li> <li><a href="/wiki/Copy_constructor_(C%2B%2B)" title="Copy constructor (C++)">Copy constructor</a></li> <li><a href="/wiki/C%2B%2B#Exception_handling" title="C++">Exception handling</a> (<a href="/wiki/Exception_safety" title="Exception safety">Exception safety</a>)</li> <li><a href="/wiki/Function_overloading" title="Function overloading">Function overloading</a></li> <li><a class="mw-selflink-fragment" href="#Rvalue_references_and_move_constructors">Move semantics</a></li> <li><a href="/wiki/New_and_delete_(C%2B%2B)" title="New and delete (C++)">new and delete</a></li> <li><a href="/wiki/Operator_overloading" title="Operator overloading">Operator overloading</a></li> <li><a href="/wiki/Operators_in_C_and_C%2B%2B" title="Operators in C and C++">Operators</a></li> <li><a href="/wiki/Reference_(C%2B%2B)" title="Reference (C++)">References</a></li> <li><a href="/wiki/Template_(C%2B%2B)" title="Template (C++)">Templates</a></li> <li><a href="/wiki/Virtual_function" title="Virtual function">Virtual functions</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/C%2B%2B_Standard_Library" title="C++ Standard Library">Standard Library</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Input/output_(C%2B%2B)" title="Input/output (C++)">I/O Streams</a></li> <li><a href="/wiki/Smart_pointer" title="Smart pointer">Smart pointers</a></li> <li><a href="/wiki/Standard_Template_Library" title="Standard Template Library">STL</a></li> <li><a href="/wiki/C%2B%2B_string_handling" title="C++ string handling">Strings</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Ideas</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/As-if_rule" title="As-if rule">As-if rule</a></li> <li><a href="/wiki/Barton%E2%80%93Nackman_trick" title="Barton–Nackman trick">Barton–Nackman trick</a></li> <li><a href="/wiki/Curiously_recurring_template_pattern" title="Curiously recurring template pattern">Curiously recurring template pattern</a></li> <li><a href="/wiki/Most_vexing_parse" title="Most vexing parse">Most vexing parse</a></li> <li><a href="/wiki/One_Definition_Rule" title="One Definition Rule">One Definition Rule</a></li> <li><a href="/wiki/Resource_acquisition_is_initialization" title="Resource acquisition is initialization">Resource acquisition is initialization</a></li> <li><a href="/wiki/Rule_of_three_(C%2B%2B_programming)" title="Rule of three (C++ programming)">Rule of three</a></li> <li><a href="/wiki/Object_slicing" title="Object slicing">Slicing</a></li> <li><a href="/wiki/Special_member_functions" title="Special member functions">Special member functions</a></li> <li><a href="/wiki/Substitution_failure_is_not_an_error" title="Substitution failure is not an error">Substitution failure is not an error</a></li> <li><a href="/wiki/Template_metaprogramming" title="Template metaprogramming">Template metaprogramming</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Category:C%2B%2B_compilers" title="Category:C++ compilers">Compilers</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/List_of_compilers#C++_compilers" title="List of compilers">Comparison of C++ compilers</a></li> <li><a href="/wiki/Borland_C%2B%2B" title="Borland C++">Borland C++</a></li> <li><a href="/wiki/Borland_C%2B%2B" title="Borland C++">Borland Turbo C++</a></li> <li><a href="/wiki/C%2B%2BBuilder" title="C++Builder">C++Builder</a></li> <li><a href="/wiki/Clang" title="Clang">Clang</a></li> <li><a href="/wiki/GNU_Compiler_Collection" title="GNU Compiler Collection">GCC</a></li> <li><a href="/wiki/Intel_C%2B%2B_Compiler" title="Intel C++ Compiler">Intel C++ Compiler</a></li> <li><a href="/wiki/Oracle_Developer_Studio" title="Oracle Developer Studio">Oracle Solaris Studio</a></li> <li><a href="/wiki/Visual_C%2B%2B" class="mw-redirect" title="Visual C++">Visual C++</a></li> <li><a href="/wiki/Watcom_C/C%2B%2B" title="Watcom C/C++">Watcom C/C++</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Category:Integrated_development_environments" title="Category:Integrated development environments">IDEs</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Comparison_of_integrated_development_environments#C/C++" title="Comparison of integrated development environments">Comparison of C IDEs</a></li> <li><a href="/wiki/Anjuta" title="Anjuta">Anjuta</a></li> <li><a href="/wiki/CLion" class="mw-redirect" title="CLion">CLion</a></li> <li><a href="/wiki/Code::Blocks" title="Code::Blocks">Code::Blocks</a></li> <li><a href="/wiki/CodeLite" title="CodeLite">CodeLite</a></li> <li><a href="/wiki/Dev-C%2B%2B" title="Dev-C++">Dev-C++</a></li> <li><a href="/wiki/Eclipse_(software)" title="Eclipse (software)">Eclipse</a></li> <li><a href="/wiki/Geany" title="Geany">Geany</a></li> <li><a href="/wiki/NetBeans" title="NetBeans">NetBeans</a></li> <li><a href="/wiki/KDevelop" title="KDevelop">KDevelop</a></li> <li><a href="/wiki/Qt_Creator" title="Qt Creator">Qt Creator</a></li> <li><a href="/wiki/Visual_Studio" title="Visual Studio">Visual Studio</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Superset languages</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Objective-C%2B%2B" class="mw-redirect" title="Objective-C++">Objective-C++</a></li> <li><a href="/wiki/C%2B%2B/CLI" title="C++/CLI">C++/CLI</a></li> <li><a href="/wiki/C%2B%2B/CX" title="C++/CX">C++/CX</a></li> <li><a href="/wiki/C%2B%2B/WinRT" title="C++/WinRT">C++/WinRT</a></li> <li><a href="/wiki/Ch_(computer_programming)" title="Ch (computer programming)">Ch</a></li> <li><a href="/wiki/SYCL" title="SYCL">SYCL</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Dialects</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Embedded_C%2B%2B" title="Embedded C++">Embedded C++</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Relative to<br />other languages</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Comparison_of_programming_languages" title="Comparison of programming languages">Comparison of programming languages</a></li> <li><a href="/wiki/Comparison_of_Java_and_C%2B%2B" title="Comparison of Java and C++">Comparison of Java and C++</a></li> <li><a href="/wiki/Comparison_of_ALGOL_68_and_C%2B%2B" title="Comparison of ALGOL 68 and C++">Comparison of ALGOL 68 and C++</a></li> <li><a href="/wiki/Compatibility_of_C_and_C%2B%2B" title="Compatibility of C and C++">Compatibility of C and C++</a></li> <li><a href="/wiki/Criticism_of_C%2B%2B" title="Criticism of C++">Criticism of C++</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Software_development" title="Software development">Designer</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Bjarne_Stroustrup" title="Bjarne Stroustrup">Bjarne Stroustrup</a></li></ul> </div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div><span class="noviewer" typeof="mw:File"><span title="Category"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/16px-Symbol_category_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/23px-Symbol_category_class.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/31px-Symbol_category_class.svg.png 2x" data-file-width="180" data-file-height="185" /></span></span> <b><a href="/wiki/Category:C%2B%2B_programming_language_family" title="Category:C++ programming language family">Category</a></b></div></td></tr></tbody></table></div> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235"><style data-mw-deduplicate="TemplateStyles:r886047488">.mw-parser-output .nobold{font-weight:normal}</style></div><div role="navigation" class="navbox" aria-labelledby="ISO_standards_by_standard_number" style="padding:3px"><table class="nowraplinks hlist mw-collapsible mw-collapsed navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239400231"><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:ISO_standards" title="Template:ISO standards"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:ISO_standards" title="Template talk:ISO standards"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:ISO_standards" title="Special:EditPage/Template:ISO standards"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="ISO_standards_by_standard_number" style="font-size:114%;margin:0 4em"><a href="/wiki/International_Organization_for_Standardization" title="International Organization for Standardization">ISO</a> standards <span class="nobold">by standard number</span></div></th></tr><tr><td class="navbox-abovebelow" colspan="2"><div>List of <a href="/wiki/List_of_ISO_standards" title="List of ISO standards">ISO standards</a> – <a href="/wiki/List_of_ISO_romanizations" title="List of ISO romanizations">ISO romanizations</a> – <a href="/wiki/List_of_IEC_standards" title="List of IEC standards">IEC standards</a></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">1–9999</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/ISO_1" title="ISO 1">1</a></li> <li><a href="/wiki/ISO_2" title="ISO 2">2</a></li> <li><a href="/wiki/Renard_series" title="Renard series">3</a></li> <li><a href="/wiki/ISO_4" title="ISO 4">4</a></li> <li><a href="/wiki/Film_speed" title="Film speed">6</a></li> <li><a href="/wiki/British_Standard_Pipe" title="British Standard Pipe">7</a></li> <li><a href="/wiki/ISO_9" title="ISO 9">9</a></li> <li><a href="/wiki/A440_(pitch_standard)" title="A440 (pitch standard)">16</a></li> <li><a href="/wiki/Renard_series" title="Renard series">17</a></li> <li><a href="/wiki/ISO_31" title="ISO 31">31</a> <ul><li><a href="/wiki/ISO_31-0" title="ISO 31-0">-0</a></li> <li><a href="/wiki/ISO_31-1" title="ISO 31-1">-1</a></li> <li><a href="/wiki/ISO_31-3" title="ISO 31-3">-3</a></li> <li><a href="/wiki/ISO_31-4" title="ISO 31-4">-4</a></li> <li><a href="/wiki/ISO_31-5" title="ISO 31-5">-5</a></li> <li><a href="/wiki/ISO_31-6" title="ISO 31-6">-6</a></li> <li><a href="/wiki/ISO_31-7" title="ISO 31-7">-7</a></li> <li><a href="/wiki/ISO_31-8" title="ISO 31-8">-8</a></li> <li><a href="/wiki/ISO_31-9" class="mw-redirect" title="ISO 31-9">-9</a></li> <li><a href="/wiki/ISO_31-10" title="ISO 31-10">-10</a></li> <li><a href="/wiki/ISO_31-11" title="ISO 31-11">-11</a></li> <li><a href="/wiki/ISO_31-12" class="mw-redirect" title="ISO 31-12">-12</a></li> <li><a href="/wiki/ISO_31-13" class="mw-redirect" title="ISO 31-13">-13</a></li></ul></li> <li><a href="/wiki/ISO_metric_screw_thread" title="ISO metric screw thread">68-1</a></li> <li><a href="/wiki/ISO_128" title="ISO 128">128</a></li> <li><a href="/wiki/ISO_216" title="ISO 216">216</a></li> <li><a href="/wiki/ISO_217" title="ISO 217">217</a></li> <li><a href="/wiki/Equal-loudness_contour" title="Equal-loudness contour">226</a></li> <li><a href="/wiki/British_Standard_Pipe" title="British Standard Pipe">228</a></li> <li><a href="/wiki/ISO_233" title="ISO 233">233</a></li> <li><a href="/wiki/ISO_259" title="ISO 259">259</a></li> <li><a href="/wiki/ISO_metric_screw_thread" title="ISO metric screw thread">261</a></li> <li><a href="/wiki/ISO_metric_screw_thread" title="ISO metric screw thread">262</a></li> <li><a href="/wiki/Kappa_number" title="Kappa number">302</a></li> <li><a href="/wiki/Vicat_softening_point" title="Vicat softening point">306</a></li> <li><a href="/wiki/Hazard_symbol#Ionizing_radiation_symbol" title="Hazard symbol">361</a></li> <li><a href="/wiki/Power_take-off" title="Power take-off">500</a></li> <li><a href="/wiki/Hot_shoe" title="Hot shoe">518</a></li> <li><a href="/wiki/Prontor-Compur" title="Prontor-Compur">519</a></li> <li><a href="/wiki/ISO_639" title="ISO 639">639</a> <ul><li><a href="/wiki/ISO_639-1" title="ISO 639-1">-1</a></li> <li><a href="/wiki/ISO_639-2" title="ISO 639-2">-2</a></li> <li><a href="/wiki/ISO_639-3" title="ISO 639-3">-3</a></li> <li><a href="/wiki/ISO_639-5" title="ISO 639-5">-5</a></li> <li><a href="/wiki/ISO_639-6" title="ISO 639-6">-6</a></li></ul></li> <li><a href="/wiki/ISO/IEC_646" title="ISO/IEC 646">646</a></li> <li><a href="/wiki/ISO_657" title="ISO 657">657</a></li> <li><a href="/wiki/ISO_668" title="ISO 668">668</a></li> <li><a href="/wiki/ISO_690" title="ISO 690">690</a></li> <li><a href="/wiki/ISO_704" title="ISO 704">704</a></li> <li><a href="/wiki/ISO_732" title="ISO 732">732</a></li> <li><a href="/wiki/Antimagnetic_watch" title="Antimagnetic watch">764</a></li> <li><a href="/wiki/Hole_punch" title="Hole punch">838</a></li> <li><a href="/wiki/ISO_843" title="ISO 843">843</a></li> <li><a href="/wiki/ISO_860" title="ISO 860">860</a></li> <li><a href="/wiki/ISO_898" title="ISO 898">898</a></li> <li><a href="/wiki/ISO_965" title="ISO 965">965</a></li> <li><a href="/wiki/ISO_999" title="ISO 999">999</a></li> <li><a href="/wiki/ISO_1000" title="ISO 1000">1000</a></li> <li><a href="/wiki/Magnetic_ink_character_recognition" title="Magnetic ink character recognition">1004</a></li> <li><a href="/wiki/135_film" title="135 film">1007</a></li> <li><a href="/wiki/OCR-A" title="OCR-A">1073-1</a></li> <li><a href="/wiki/OCR-B" title="OCR-B">1073-2</a></li> <li><a href="/wiki/Longitudinal_redundancy_check" title="Longitudinal redundancy check">1155</a></li> <li><a href="/wiki/Shock-resistant_watch#ISO_1413_shock-resistant_standard" title="Shock-resistant watch">1413</a></li> <li><a href="/wiki/ALGOL_60" title="ALGOL 60">1538</a></li> <li><a href="/wiki/ISO_1629" title="ISO 1629">1629</a></li> <li><a href="/wiki/ISO_1745" title="ISO 1745">1745</a></li> <li><a href="/wiki/COBOL" title="COBOL">1989</a></li> <li><a href="/wiki/ISO_2014" title="ISO 2014">2014</a></li> <li><a href="/wiki/ISO_2015" title="ISO 2015">2015</a></li> <li><a href="/wiki/ISO/IEC_2022" title="ISO/IEC 2022">2022</a></li> <li><a href="/wiki/ISO_2033" title="ISO 2033">2033</a></li> <li><a href="/wiki/ISO_2047" title="ISO 2047">2047</a></li> <li><a href="/wiki/ISBN" title="ISBN">2108</a></li> <li><a href="/wiki/ISO_2145" title="ISO 2145">2145</a></li> <li><a href="/wiki/ISO_2146" title="ISO 2146">2146</a></li> <li><a href="/wiki/Film_speed" title="Film speed">2240</a></li> <li><a href="/wiki/Water_Resistant_mark" title="Water Resistant mark">2281</a></li> <li><a href="/wiki/International_Standard_Atmosphere" title="International Standard Atmosphere">2533</a></li> <li><a href="/wiki/ISO_2709" title="ISO 2709">2709</a></li> <li><a href="/wiki/ISO_2711" title="ISO 2711">2711</a></li> <li><a href="/wiki/Film_speed" title="Film speed">2720</a></li> <li><a href="/wiki/ISO_2788" title="ISO 2788">2788</a></li> <li><a href="/wiki/ISO_2848" title="ISO 2848">2848</a></li> <li><a href="/wiki/ISO_2852" title="ISO 2852">2852</a></li> <li><a href="/wiki/ISO_2921" title="ISO 2921">2921</a></li> <li><a href="/wiki/126_film" title="126 film">3029</a></li> <li><a href="/wiki/ISO_3103" title="ISO 3103">3103</a></li> <li><a href="/wiki/ISO_3166" title="ISO 3166">3166</a> <ul><li><a href="/wiki/ISO_3166-1" title="ISO 3166-1">-1</a></li> <li><a href="/wiki/ISO_3166-2" title="ISO 3166-2">-2</a></li> <li><a href="/wiki/ISO_3166-3" title="ISO 3166-3">-3</a></li></ul></li> <li><a href="/wiki/International_Standard_Serial_Number" class="mw-redirect" title="International Standard Serial Number">3297</a></li> <li><a href="/wiki/ISO_3307" title="ISO 3307">3307</a></li> <li><a href="/wiki/O-ring" title="O-ring">3601</a></li> <li><a href="/wiki/Kunrei-shiki_romanization" title="Kunrei-shiki romanization">3602</a></li> <li><a href="/wiki/ISO_3864" title="ISO 3864">3864</a></li> <li><a href="/wiki/International_Standard_Recording_Code" title="International Standard Recording Code">3901</a></li> <li><a href="/wiki/FDI_World_Dental_Federation_notation" title="FDI World Dental Federation notation">3950</a></li> <li><a href="/wiki/ISO_3977" title="ISO 3977">3977</a></li> <li><a href="/wiki/ISO_4031" title="ISO 4031">4031</a></li> <li><a href="/wiki/ISO_4157" title="ISO 4157">4157</a></li> <li><a href="/wiki/ISO_4165" title="ISO 4165">4165</a></li> <li><a href="/wiki/ISO_4217" title="ISO 4217">4217</a></li> <li><a href="/wiki/ISO/IEC_4909" title="ISO/IEC 4909">4909</a></li> <li><a href="/wiki/ISO/IEC_5218" title="ISO/IEC 5218">5218</a></li> <li><a href="/wiki/ISO_5426" title="ISO 5426">5426</a></li> <li><a href="/wiki/ISO_5427" title="ISO 5427">5427</a></li> <li><a href="/wiki/ISO_5428" title="ISO 5428">5428</a></li> <li><a href="/wiki/Accuracy_and_precision" title="Accuracy and precision">5725</a></li> <li><a href="/wiki/ISO_5775" title="ISO 5775">5775</a></li> <li><a href="/wiki/ISO_5776" title="ISO 5776">5776</a></li> <li><a href="/wiki/Film_speed" title="Film speed">5800</a></li> <li><a href="/wiki/Flowchart" title="Flowchart">5807</a></li> <li><a href="/wiki/ISO_5964" title="ISO 5964">5964</a></li> <li><a href="/wiki/International_Securities_Identification_Number" title="International Securities Identification Number">6166</a></li> <li><a href="/wiki/ISO_6344" title="ISO 6344">6344</a></li> <li><a href="/wiki/ISO_6346" title="ISO 6346">6346</a></li> <li><a href="/wiki/Minimal_BASIC" title="Minimal BASIC">6373</a></li> <li><a href="/wiki/ISO_6385" title="ISO 6385">6385</a></li> <li><a href="/wiki/Water_Resistant_mark" title="Water Resistant mark">6425</a></li> <li><a href="/wiki/ANSI_escape_code" title="ANSI escape code">6429</a></li> <li><a href="/wiki/ISO_6438" title="ISO 6438">6438</a></li> <li><a href="/wiki/ISO/IEC_6523" title="ISO/IEC 6523">6523</a></li> <li><a href="/wiki/ISO_6709" title="ISO 6709">6709</a></li> <li><a href="/wiki/ISO_6943" title="ISO 6943">6943</a></li> <li><a href="/wiki/ISO_7001" title="ISO 7001">7001</a></li> <li><a href="/wiki/ISO_7002" title="ISO 7002">7002</a></li> <li><a href="/wiki/ISO_7010" title="ISO 7010">7010</a></li> <li><a href="/wiki/ISO_7027" title="ISO 7027">7027</a></li> <li><a href="/wiki/ISO/IEC_7064" title="ISO/IEC 7064">7064</a></li> <li><a href="/wiki/Pinyin" class="mw-redirect" title="Pinyin">7098</a></li> <li><a href="/wiki/Pascal_(programming_language)" title="Pascal (programming language)">7185</a></li> <li><a href="/wiki/ISO_7200" title="ISO 7200">7200</a></li> <li><a href="/wiki/OSI_model" title="OSI model">7498</a> <ul><li><a href="/wiki/OSI_model" title="OSI model">-1</a></li></ul></li> <li><a href="/wiki/ISO_7637" title="ISO 7637">7637</a></li> <li><a href="/wiki/ISO_7736" title="ISO 7736">7736</a></li> <li><a href="/wiki/ISO/IEC_7810" title="ISO/IEC 7810">7810</a></li> <li><a href="/wiki/ISO/IEC_7811" title="ISO/IEC 7811">7811</a></li> <li><a href="/wiki/ISO/IEC_7812" title="ISO/IEC 7812">7812</a></li> <li><a href="/wiki/ISO/IEC_7813" title="ISO/IEC 7813">7813</a></li> <li><a href="/wiki/ISO/IEC_7816" title="ISO/IEC 7816">7816</a></li> <li><a href="/wiki/Graphical_Kernel_System" title="Graphical Kernel System">7942</a></li> <li><a href="/wiki/ISO_8000" title="ISO 8000">8000</a></li> <li><a href="/wiki/On-board_diagnostics" title="On-board diagnostics">8093</a></li> <li><a href="/wiki/ISO_8178" title="ISO 8178">8178</a></li> <li><a href="/wiki/Fuel_oil" title="Fuel oil">8217</a></li> <li><a href="/wiki/ISO_8373" class="mw-redirect" title="ISO 8373">8373</a></li> <li><a href="/wiki/ISO_8501-1" title="ISO 8501-1">8501-1</a></li> <li><a href="/wiki/FTAM" title="FTAM">8571</a></li> <li><a href="/wiki/ISO_8583" title="ISO 8583">8583</a></li> <li><a href="/wiki/ISO_8601" title="ISO 8601">8601</a></li> <li><a href="/wiki/Open_Document_Architecture" title="Open Document Architecture">8613</a></li> <li><a href="/wiki/Computer_Graphics_Metafile" title="Computer Graphics Metafile">8632</a></li> <li><a href="/wiki/Graphical_Kernel_System" title="Graphical Kernel System">8651</a></li> <li><a href="/wiki/ISO/IEC_8652" title="ISO/IEC 8652">8652</a></li> <li><a href="/wiki/ISO_8691" title="ISO 8691">8691</a></li> <li><a href="/wiki/Graphical_Kernel_System" title="Graphical Kernel System">8805/8806</a></li> <li><a href="/wiki/Language_Of_Temporal_Ordering_Specification" class="mw-redirect" title="Language Of Temporal Ordering Specification">8807</a></li> <li><a href="/wiki/Fuse_(automotive)" class="mw-redirect" title="Fuse (automotive)">8820-5</a></li> <li><a href="/wiki/ISO/IEC_8859" title="ISO/IEC 8859">8859</a> <ul><li><a href="/wiki/ISO/IEC_8859-1" title="ISO/IEC 8859-1">-1</a></li> <li><a href="/wiki/ISO/IEC_8859-2" title="ISO/IEC 8859-2">-2</a></li> <li><a href="/wiki/ISO/IEC_8859-3" title="ISO/IEC 8859-3">-3</a></li> <li><a href="/wiki/ISO/IEC_8859-4" title="ISO/IEC 8859-4">-4</a></li> <li><a href="/wiki/ISO/IEC_8859-5" title="ISO/IEC 8859-5">-5</a></li> <li><a href="/wiki/ISO/IEC_8859-6" title="ISO/IEC 8859-6">-6</a></li> <li><a href="/wiki/ISO/IEC_8859-7" title="ISO/IEC 8859-7">-7</a></li> <li><a href="/wiki/ISO/IEC_8859-8" title="ISO/IEC 8859-8">-8</a></li> <li><a href="/wiki/ISO-8859-8-I" title="ISO-8859-8-I">-8-I</a></li> <li><a href="/wiki/ISO/IEC_8859-9" title="ISO/IEC 8859-9">-9</a></li> <li><a href="/wiki/ISO/IEC_8859-10" title="ISO/IEC 8859-10">-10</a></li> <li><a href="/wiki/ISO/IEC_8859-11" title="ISO/IEC 8859-11">-11</a></li> <li><a href="/wiki/ISO/IEC_8859-12" class="mw-redirect" title="ISO/IEC 8859-12">-12</a></li> <li><a href="/wiki/ISO/IEC_8859-13" title="ISO/IEC 8859-13">-13</a></li> <li><a href="/wiki/ISO/IEC_8859-14" title="ISO/IEC 8859-14">-14</a></li> <li><a href="/wiki/ISO/IEC_8859-15" title="ISO/IEC 8859-15">-15</a></li> <li><a href="/wiki/ISO/IEC_8859-16" title="ISO/IEC 8859-16">-16</a></li></ul></li> <li><a href="/wiki/Standard_Generalized_Markup_Language" title="Standard Generalized Markup Language">8879</a></li> <li><a href="/wiki/ISO_9000" class="mw-redirect" title="ISO 9000">9000/9001</a></li> <li><a href="/wiki/ASMO_449" title="ASMO 449">9036</a></li> <li><a href="/wiki/SQL" title="SQL">9075</a></li> <li><a href="/wiki/ISO/IEC_9126" title="ISO/IEC 9126">9126</a></li> <li><a href="/wiki/On-board_diagnostics" title="On-board diagnostics">9141</a></li> <li><a href="/wiki/Salt_spray_test" title="Salt spray test">9227</a></li> <li><a href="/wiki/ISO_9241" title="ISO 9241">9241</a></li> <li><a href="/wiki/File_Allocation_Table" title="File Allocation Table">9293</a></li> <li><a href="/wiki/Fiber_Distributed_Data_Interface" title="Fiber Distributed Data Interface">9314</a></li> <li><a href="/wiki/ISO_9362" title="ISO 9362">9362</a></li> <li><a href="/wiki/Shoe_size" title="Shoe size">9407</a></li> <li><a href="/wiki/CHILL" title="CHILL">9496</a></li> <li><a href="/wiki/Manufacturing_Message_Specification" title="Manufacturing Message Specification">9506</a></li> <li><a href="/wiki/ISO/IEC_9529" title="ISO/IEC 9529">9529</a></li> <li><a href="/wiki/ISO_9564" title="ISO 9564">9564</a></li> <li><a href="/wiki/PHIGS" title="PHIGS">9592/9593</a></li> <li><a href="/wiki/X.500" title="X.500">9594</a></li> <li><a href="/wiki/ISO_9660" title="ISO 9660">9660</a></li> <li><a href="/wiki/ISO/IEC_9797-1" title="ISO/IEC 9797-1">9797-1</a></li> <li><a href="/wiki/ISO_9897" title="ISO 9897">9897</a></li> <li><a href="/wiki/ANSI_C" title="ANSI C">9899</a></li> <li><a href="/wiki/POSIX" title="POSIX">9945</a></li> <li><a href="/wiki/Romanization_of_Georgian" title="Romanization of Georgian">9984</a></li> <li><a href="/wiki/Romanization_of_Armenian" title="Romanization of Armenian">9985</a></li> <li><a href="/wiki/ISO/IEC_9995" title="ISO/IEC 9995">9995</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">10000–19999</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/ISO_10006" title="ISO 10006">10006</a></li> <li><a href="/wiki/ISO_10007" title="ISO 10007">10007</a></li> <li><a href="/wiki/ISO/IEC_10116" title="ISO/IEC 10116">10116</a></li> <li><a href="/wiki/Whirlpool_(hash_function)" title="Whirlpool (hash function)">10118-3</a></li> <li><a href="/wiki/ISO_10160" title="ISO 10160">10160</a></li> <li><a href="/wiki/ISO_10161" title="ISO 10161">10161</a></li> <li><a href="/wiki/Guidelines_for_the_Definition_of_Managed_Objects" title="Guidelines for the Definition of Managed Objects">10165</a></li> <li><a href="/wiki/Document_Style_Semantics_and_Specification_Language" title="Document Style Semantics and Specification Language">10179</a></li> <li><a href="/wiki/Pascal_(programming_language)#ISO/IEC_10206:1990_Extended_Pascal" title="Pascal (programming language)">10206</a></li> <li><a href="/wiki/ISO_10218" title="ISO 10218">10218</a></li> <li><a href="/wiki/Full_BASIC" title="Full BASIC">10279</a></li> <li><a href="/wiki/ISO_10303" title="ISO 10303">10303</a> <ul><li><a href="/wiki/EXPRESS_(data_modeling_language)" title="EXPRESS (data modeling language)">-11</a></li> <li><a href="/wiki/ISO_10303-21" title="ISO 10303-21">-21</a></li> <li><a href="/wiki/ISO_10303-22" title="ISO 10303-22">-22</a></li> <li><a href="/wiki/ISO_10303-28" title="ISO 10303-28">-28</a></li> <li><a href="/wiki/STEP-NC" title="STEP-NC">-238</a></li></ul></li> <li><a href="/wiki/Market_Identifier_Code" title="Market Identifier Code">10383</a></li> <li><a href="/wiki/ArmSCII" title="ArmSCII">10585</a></li> <li><a href="/wiki/IS-IS" title="IS-IS">10589</a></li> <li><a href="/wiki/ISO_10628" title="ISO 10628">10628</a></li> <li><a href="/wiki/Universal_Coded_Character_Set" title="Universal Coded Character Set">10646</a></li> <li><a href="/wiki/Torx" title="Torx">10664</a></li> <li><a href="/wiki/RM-ODP" title="RM-ODP">10746</a></li> <li><a href="/wiki/Multibus" title="Multibus">10861</a></li> <li><a href="/wiki/International_Standard_Music_Number" title="International Standard Music Number">10957</a></li> <li><a href="/wiki/ISO_10962" title="ISO 10962">10962</a></li> <li><a href="/wiki/ISO/IEC_10967" title="ISO/IEC 10967">10967</a></li> <li><a href="/wiki/ISO/IEEE_11073" title="ISO/IEEE 11073">11073</a></li> <li><a href="/wiki/ISO_11170" title="ISO 11170">11170</a></li> <li><a href="/wiki/MPEG-1" title="MPEG-1">11172</a></li> <li><a href="/wiki/ISO/IEC_11179" title="ISO/IEC 11179">11179</a></li> <li><a href="/wiki/ISO/IEC_11404" title="ISO/IEC 11404">11404</a></li> <li><a href="/wiki/JBIG" title="JBIG">11544</a></li> <li><a href="/wiki/ISO_11783" title="ISO 11783">11783</a></li> <li><a href="/wiki/ISO_11784_and_ISO_11785" title="ISO 11784 and ISO 11785">11784</a></li> <li><a href="/wiki/ISO_11784_and_ISO_11785" title="ISO 11784 and ISO 11785">11785</a></li> <li><a href="/wiki/ISO/IEC_11801" title="ISO/IEC 11801">11801</a></li> <li><a href="/wiki/Trusted_Platform_Module" title="Trusted Platform Module">11889</a></li> <li><a href="/wiki/CAN_bus#CAN_lower-layer_standards" title="CAN bus">11898</a></li> <li><a href="/wiki/ISO_11940" title="ISO 11940">11940</a> (<a href="/wiki/ISO_11940-2" title="ISO 11940-2">-2</a>)</li> <li><a href="/wiki/ISO/TR_11941" title="ISO/TR 11941">11941</a></li> <li><a href="/wiki/ISO/TR_11941" title="ISO/TR 11941">11941 (TR)</a></li> <li><a href="/wiki/ISO_11992" title="ISO 11992">11992</a></li> <li><a href="/wiki/ISO_12006" title="ISO 12006">12006</a></li> <li><a href="/wiki/DICOM" title="DICOM">12052</a></li> <li><a href="/wiki/ISO/IEC_TR_12182" title="ISO/IEC TR 12182">12182</a></li> <li><a href="/wiki/ISO/IEC_12207" title="ISO/IEC 12207">12207</a></li> <li><a href="/wiki/TIFF/EP" title="TIFF/EP">12234-2</a></li> <li><a href="/wiki/Linguistic_categories#ISO_12620_(ISO_TC37_Data_Category_Registry,_ISOcat)" title="Linguistic categories">12620</a></li> <li><a href="/wiki/Prolog" title="Prolog">13211</a> <ul><li><a href="/wiki/Prolog" title="Prolog">-1</a></li> <li><a href="/wiki/Prolog" title="Prolog">-2</a></li></ul></li> <li><a href="/wiki/Isofix" title="Isofix">13216</a></li> <li><a href="/wiki/Topic_map" title="Topic map">13250</a></li> <li><a href="/wiki/ISO_13399" title="ISO 13399">13399</a></li> <li><a href="/wiki/ISO_13406-2" title="ISO 13406-2">13406-2</a></li> <li><a href="/wiki/110_film" title="110 film">13450</a></li> <li><a href="/wiki/ISO_13485" title="ISO 13485">13485</a></li> <li><a href="/wiki/ISO_13490" title="ISO 13490">13490</a></li> <li><a href="/wiki/ISO_13567" title="ISO 13567">13567</a></li> <li><a href="/wiki/Z_notation" title="Z notation">13568</a></li> <li><a href="/wiki/ISO_13584" title="ISO 13584">13584</a></li> <li><a href="/wiki/International_Bank_Account_Number" title="International Bank Account Number">13616</a></li> <li><a href="/wiki/ISLISP" title="ISLISP">13816</a></li> <li><a href="/wiki/MPEG-2" title="MPEG-2">13818</a></li> <li><a href="/wiki/ISO_14000" class="mw-redirect" title="ISO 14000">14000</a></li> <li><a href="/wiki/ISO_14031" title="ISO 14031">14031</a></li> <li><a href="/wiki/ISO_14224" title="ISO 14224">14224</a></li> <li><a href="/wiki/PDF/UA" title="PDF/UA">14289</a></li> <li><a href="/wiki/Horsepower" title="Horsepower">14396</a></li> <li><a href="/wiki/ISO/IEC_14443" title="ISO/IEC 14443">14443</a></li> <li><a href="/wiki/MPEG-4" title="MPEG-4">14496</a> <ul><li><a href="/wiki/MPEG-4_Part_2" title="MPEG-4 Part 2">-2</a></li> <li><a href="/wiki/MPEG-4_Part_3" title="MPEG-4 Part 3">-3</a></li> <li><a href="/wiki/Delivery_Multimedia_Integration_Framework" title="Delivery Multimedia Integration Framework">-6</a></li> <li><a href="/wiki/Advanced_Video_Coding" title="Advanced Video Coding">-10</a></li> <li><a href="/wiki/MPEG-4_Part_11" title="MPEG-4 Part 11">-11</a></li> <li><a href="/wiki/ISO_base_media_file_format" title="ISO base media file format">-12</a></li> <li><a href="/wiki/MP4_file_format" title="MP4 file format">-14</a></li> <li><a href="/wiki/MP4_file_format" title="MP4 file format">-17</a></li> <li><a href="/wiki/MP4_file_format" title="MP4 file format">-20</a></li></ul></li> <li><a href="/wiki/ISO_14617" title="ISO 14617">14617</a></li> <li><a href="/wiki/ISO_14644" title="ISO 14644">14644</a></li> <li><a href="/wiki/STEP-NC" title="STEP-NC">14649</a></li> <li><a href="/wiki/ISO/IEC_14651" title="ISO/IEC 14651">14651</a></li> <li><a href="/wiki/ISO_14698" title="ISO 14698">14698</a></li> <li><a href="/wiki/Software_maintenance" title="Software maintenance">14764</a></li> <li><a href="/wiki/C%2B%2B" title="C++">14882</a></li> <li><a href="/wiki/ISO_14971" title="ISO 14971">14971</a></li> <li><a href="/wiki/ISO_15022" title="ISO 15022">15022</a></li> <li><a href="/wiki/ISO_15189" title="ISO 15189">15189</a></li> <li><a href="/wiki/ISO/IEC_15288" title="ISO/IEC 15288">15288</a></li> <li><a href="/wiki/Ada_Semantic_Interface_Specification" title="Ada Semantic Interface Specification">15291</a></li> <li><a href="/wiki/ISO_15398" title="ISO 15398">15398</a></li> <li><a href="/wiki/Common_Criteria" title="Common Criteria">15408</a></li> <li><a href="/wiki/JPEG_2000" title="JPEG 2000">15444</a> <ul><li><a href="/wiki/Motion_JPEG_2000" title="Motion JPEG 2000">-3</a></li> <li><a href="/wiki/JPIP" title="JPIP">-9</a></li></ul></li> <li><a href="/wiki/HTML" title="HTML">15445</a></li> <li><a href="/wiki/PDF417" title="PDF417">15438</a></li> <li><a href="/wiki/ISO/IEC_15504" title="ISO/IEC 15504">15504</a></li> <li><a href="/wiki/International_Standard_Identifier_for_Libraries_and_Related_Organizations" title="International Standard Identifier for Libraries and Related Organizations">15511</a></li> <li><a href="/wiki/ISO_15686" title="ISO 15686">15686</a></li> <li><a href="/wiki/ISO/IEC_15693" title="ISO/IEC 15693">15693</a></li> <li><a href="/wiki/International_Standard_Audiovisual_Number" title="International Standard Audiovisual Number">15706</a> <ul><li><a href="/wiki/International_Standard_Audiovisual_Number" title="International Standard Audiovisual Number">-2</a></li></ul></li> <li><a href="/wiki/International_Standard_Musical_Work_Code" title="International Standard Musical Work Code">15707</a></li> <li><a href="/wiki/ISO/IEC_15897" title="ISO/IEC 15897">15897</a></li> <li><a href="/wiki/ISO_15919" title="ISO 15919">15919</a></li> <li><a href="/wiki/ISO_15924" title="ISO 15924">15924</a></li> <li><a href="/wiki/ISO_15926" title="ISO 15926">15926</a></li> <li><a href="/wiki/ISO_15926_WIP" title="ISO 15926 WIP">15926 WIP</a></li> <li><a href="/wiki/PDF/X" title="PDF/X">15930</a></li> <li><a href="/wiki/MPEG-7" title="MPEG-7">15938</a></li> <li><a href="/wiki/MaxiCode" title="MaxiCode">16023</a></li> <li><a href="/wiki/ECMAScript" title="ECMAScript">16262</a></li> <li><a href="/wiki/Quality_function_deployment" title="Quality function deployment">16355-1</a></li> <li><a href="/wiki/Mixed_raster_content" title="Mixed raster content">16485</a></li> <li><a href="/wiki/PDF/VT" title="PDF/VT">16612-2</a></li> <li><a href="/wiki/ISO_16750" title="ISO 16750">16750</a></li> <li><a href="/wiki/IATF_16949" title="IATF 16949">16949 (TS)</a></li> <li><a href="/wiki/ISO/IEC_17024" title="ISO/IEC 17024">17024</a></li> <li><a href="/wiki/ISO/IEC_17025" title="ISO/IEC 17025">17025</a></li> <li><a href="/wiki/ISO_17100" title="ISO 17100">17100</a></li> <li><a href="/wiki/Open_Virtualization_Format" title="Open Virtualization Format">17203</a></li> <li><a href="/wiki/SDMX" title="SDMX">17369</a></li> <li><a href="/wiki/Legal_Entity_Identifier" title="Legal Entity Identifier">17442</a></li> <li><a href="/wiki/COLLADA" title="COLLADA">17506</a></li> <li><a href="/wiki/ISO/IEC_27002" title="ISO/IEC 27002">17799</a></li> <li><a href="/wiki/QR_code" title="QR code">18004</a></li> <li><a href="/wiki/ISO/IEC_18014" title="ISO/IEC 18014">18014</a></li> <li><a href="/wiki/JPEG_XL" title="JPEG XL">18181</a></li> <li><a href="/wiki/ISO_18245" title="ISO 18245">18245</a></li> <li><a href="/wiki/Process_Specification_Language" title="Process Specification Language">18629</a></li> <li><a href="/wiki/Photographic_Activity_Test" title="Photographic Activity Test">18916</a></li> <li><a href="/wiki/PDF/A" title="PDF/A">19005</a></li> <li><a href="/wiki/ISO_19011" title="ISO 19011">19011</a></li> <li><a href="/wiki/ISO_19092-1" class="mw-redirect" title="ISO 19092-1">19092</a> <ul><li><a href="/wiki/ISO_19092-1" class="mw-redirect" title="ISO 19092-1">-1</a></li> <li><a href="/wiki/ISO_19092-2" class="mw-redirect" title="ISO 19092-2">-2</a></li></ul></li> <li><a href="/wiki/ISO_19114" title="ISO 19114">19114</a></li> <li><a href="/wiki/Geospatial_metadata#ISO_19115:_Geographic_information_–_Metadata" title="Geospatial metadata">19115</a></li> <li><a href="/wiki/Simple_Features" title="Simple Features">19125</a></li> <li><a href="/wiki/Geography_Markup_Language#ISO_19136" title="Geography Markup Language">19136</a></li> <li><a href="/wiki/Shoe_size" title="Shoe size">19407</a></li> <li><a href="/wiki/ISO_19439" title="ISO 19439">19439</a></li> <li><a href="/wiki/Common_Object_Request_Broker_Architecture" title="Common Object Request Broker Architecture">19500</a></li> <li><a href="/wiki/Unified_Modeling_Language" title="Unified Modeling Language">19501</a></li> <li><a href="/wiki/Meta-Object_Facility" title="Meta-Object Facility">19502</a></li> <li><a href="/wiki/XML_Metadata_Interchange" title="XML Metadata Interchange">19503</a></li> <li><a href="/wiki/Unified_Modeling_Language" title="Unified Modeling Language">19505</a></li> <li><a href="/wiki/Knowledge_Discovery_Metamodel" title="Knowledge Discovery Metamodel">19506</a></li> <li><a href="/wiki/Object_Constraint_Language" title="Object Constraint Language">19507</a></li> <li><a href="/wiki/Meta-Object_Facility" title="Meta-Object Facility">19508</a></li> <li><a href="/wiki/XML_Metadata_Interchange" title="XML Metadata Interchange">19509</a></li> <li><a href="/wiki/Business_Process_Model_and_Notation" title="Business Process Model and Notation">19510</a></li> <li><a href="/wiki/ISO_19600" title="ISO 19600">19600</a></li> <li><a href="/wiki/ISO/IEC_19752" title="ISO/IEC 19752">19752</a></li> <li><a href="/wiki/RELAX_NG" title="RELAX NG">19757</a></li> <li><a href="/wiki/ISO/IEC_19770" title="ISO/IEC 19770">19770</a></li> <li><a href="/wiki/X3D" title="X3D">19775-1</a></li> <li><a href="/wiki/ISO/IEC_19794-5" title="ISO/IEC 19794-5">19794-5</a></li> <li><a href="/wiki/Cloud_Infrastructure_Management_Interface" title="Cloud Infrastructure Management Interface">19831</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">20000–29999</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/ISO/IEC_20000" title="ISO/IEC 20000">20000</a></li> <li><a href="/wiki/ISO_20022" title="ISO 20022">20022</a></li> <li><a href="/wiki/ISO_20121" title="ISO 20121">20121</a></li> <li><a href="/wiki/ISO_20400" title="ISO 20400">20400</a></li> <li><a href="/wiki/Open_Data_Protocol" title="Open Data Protocol">20802</a></li> <li><a href="/wiki/Han_Xin_code" title="Han Xin code">20830</a></li> <li><a href="/wiki/MPEG-21" title="MPEG-21">21000</a></li> <li><a href="/wiki/ISO_21001" title="ISO 21001">21001</a></li> <li><a href="/wiki/International_Standard_Text_Code" title="International Standard Text Code">21047</a></li> <li><a href="/wiki/JPEG_XS" title="JPEG XS">21122</a></li> <li><a href="/wiki/ISO_21500" title="ISO 21500">21500</a></li> <li><a href="/wiki/ISO/IEC_21827" title="ISO/IEC 21827">21827</a></li> <li><a href="/wiki/ISO_22000" title="ISO 22000">22000</a></li> <li><a href="/wiki/ECMAScript" title="ECMAScript">22275</a></li> <li><a href="/wiki/ISO_22300" title="ISO 22300">22300</a></li> <li><a href="/wiki/ISO_22301" title="ISO 22301">22301</a></li> <li><a href="/wiki/ISO_22395" title="ISO 22395">22395</a></li> <li><a href="/wiki/ECMAScript_for_XML" title="ECMAScript for XML">22537</a></li> <li><a href="/wiki/MPEG-A" title="MPEG-A">23000</a></li> <li><a href="/wiki/MPEG-D" title="MPEG-D">23003</a></li> <li><a href="/wiki/MPEG-H" title="MPEG-H">23008</a></li> <li><a href="/wiki/Dynamic_Adaptive_Streaming_over_HTTP" title="Dynamic Adaptive Streaming over HTTP">23009</a></li> <li><a href="/wiki/Versatile_Video_Coding" title="Versatile Video Coding">23090-3</a></li> <li><a href="/wiki/MPEG-G" title="MPEG-G">23092</a></li> <li><a href="/wiki/Essential_Video_Coding" title="Essential Video Coding">23094-1</a></li> <li><a href="/wiki/LCEVC" title="LCEVC">23094-2</a></li> <li><a href="/wiki/C_Sharp_(programming_language)" title="C Sharp (programming language)">23270</a></li> <li><a href="/wiki/Common_Language_Infrastructure" title="Common Language Infrastructure">23271</a></li> <li><a href="/wiki/Linux_Standard_Base" title="Linux Standard Base">23360</a></li> <li><a href="/wiki/Rectangular_Micro_QR_Code" title="Rectangular Micro QR Code">23941</a></li> <li><a href="/wiki/PDF/E" title="PDF/E">24517</a></li> <li><a href="/wiki/Lexical_Markup_Framework" title="Lexical Markup Framework">24613</a></li> <li><a href="/wiki/ISO-TimeML" title="ISO-TimeML">24617</a></li> <li><a href="/wiki/Common_Logic" title="Common Logic">24707</a></li> <li><a href="/wiki/MicroPDF417" title="MicroPDF417">24728</a></li> <li><a href="/wiki/ISO_25178" title="ISO 25178">25178</a></li> <li><a href="/wiki/ISO_25964" title="ISO 25964">25964</a></li> <li><a href="/wiki/ISO_26000" title="ISO 26000">26000</a></li> <li><a href="/wiki/ISO_26262" title="ISO 26262">26262</a></li> <li><a href="/wiki/OpenDocument" title="OpenDocument">26300</a></li> <li><a href="/wiki/Digital_object_identifier" title="Digital object identifier">26324</a></li> <li><a href="/wiki/ISO/IEC_27000-series" class="mw-redirect" title="ISO/IEC 27000-series">27000 series</a></li> <li><a href="/wiki/ISO/IEC_27000" title="ISO/IEC 27000">27000</a></li> <li><a href="/wiki/ISO/IEC_27001" title="ISO/IEC 27001">27001</a></li> <li><a href="/wiki/ISO/IEC_27002" title="ISO/IEC 27002">27002</a></li> <li><a href="/wiki/ISO/IEC_27005" title="ISO/IEC 27005">27005</a></li> <li><a href="/wiki/ISO/IEC_27006" title="ISO/IEC 27006">27006</a></li> <li><a href="/wiki/International_Standard_Name_Identifier" title="International Standard Name Identifier">27729</a></li> <li><a href="/wiki/ISO_28000" title="ISO 28000">28000</a></li> <li>29110</li> <li><a href="/wiki/Requirements_engineering" title="Requirements engineering">29148</a></li> <li><a href="/wiki/JPEG_XR" title="JPEG XR">29199-2</a></li> <li><a href="/wiki/Office_Open_XML" title="Office Open XML">29500</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">30000+</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Ruby_(programming_language)" title="Ruby (programming language)">30170</a></li> <li><a href="/wiki/ISO_31000" title="ISO 31000">31000</a></li> <li><a href="/wiki/PDF" title="PDF">32000</a></li> <li><a href="/wiki/ISO_37001" title="ISO 37001">37001</a></li> <li><a href="/wiki/ISO/IEC_38500" title="ISO/IEC 38500">38500</a></li> <li><a href="/wiki/Graph_Query_Language" title="Graph Query Language">39075</a></li> <li><a href="/wiki/Web_Content_Accessibility_Guidelines" title="Web Content Accessibility Guidelines">40500</a></li> <li><a href="/wiki/ISO/IEC_42010" title="ISO/IEC 42010">42010</a></li> <li><a href="/wiki/ISO_45001" title="ISO 45001">45001</a></li> <li><a href="/wiki/ISO_50001" title="ISO 50001">50001</a></li> <li><a href="/wiki/ISO_55000" title="ISO 55000">55000</a></li> <li><a href="/wiki/ISO_56000" title="ISO 56000">56000</a></li> <li><a href="/wiki/ISO/IEC_80000" title="ISO/IEC 80000">80000</a></li></ul> </div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div> <ul><li><span class="noviewer" typeof="mw:File"><span title="Category"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/16px-Symbol_category_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/23px-Symbol_category_class.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/31px-Symbol_category_class.svg.png 2x" data-file-width="180" data-file-height="185" /></span></span> <a href="/wiki/Category:ISO_standards" title="Category:ISO standards">Category</a></li></ul> </div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐f69cdc8f6‐9j6r5 Cached time: 20241122141948 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 1.108 seconds Real time usage: 4.309 seconds Preprocessor visited node count: 3235/1000000 Post‐expand include size: 126494/2097152 bytes Template argument size: 1893/2097152 bytes Highest expansion depth: 12/100 Expensive parser function count: 88/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 238322/5000000 bytes Lua time usage: 0.526/10.000 seconds Lua memory usage: 6984122/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 3978.654 1 -total 7.01% 278.708 1 Template:Reflist 5.95% 236.552 26 Template:Cite_web 3.50% 139.333 1 Template:Short_description 2.79% 111.131 1 Template:C++_language_revisions 2.69% 106.902 1 Template:Sidebar 2.46% 97.814 2 Template:Pagetype 1.74% 69.152 1 Template:Condensed 1.66% 66.168 3 Template:Ambox 1.66% 66.141 4 Template:Code --> <!-- Saved in parser cache with key enwiki:pcache:idhash:5481447-0!canonical and timestamp 20241122141948 and revision id 1247284989. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=C%2B%2B11&amp;oldid=1247284989">https://en.wikipedia.org/w/index.php?title=C%2B%2B11&amp;oldid=1247284989</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:C%2B%2B" title="Category:C++">C++</a></li><li><a href="/wiki/Category:Programming_language_standards" title="Category:Programming language standards">Programming language standards</a></li><li><a href="/wiki/Category:C%2B%2B_programming_language_family" title="Category:C++ programming language family">C++ programming language family</a></li><li><a href="/wiki/Category:IEC_standards" title="Category:IEC standards">IEC standards</a></li><li><a href="/wiki/Category:ISO_standards" title="Category:ISO standards">ISO standards</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_matches_Wikidata" title="Category:Short description matches Wikidata">Short description matches Wikidata</a></li><li><a href="/wiki/Category:Articles_needing_cleanup_from_March_2017" title="Category:Articles needing cleanup from March 2017">Articles needing cleanup from March 2017</a></li><li><a href="/wiki/Category:All_pages_needing_cleanup" title="Category:All pages needing cleanup">All pages needing cleanup</a></li><li><a href="/wiki/Category:Wikipedia_articles_that_are_too_technical_from_March_2017" title="Category:Wikipedia articles that are too technical from March 2017">Wikipedia articles that are too technical from March 2017</a></li><li><a href="/wiki/Category:All_articles_that_are_too_technical" title="Category:All articles that are too technical">All articles that are too technical</a></li><li><a href="/wiki/Category:All_articles_with_unsourced_statements" title="Category:All articles with unsourced statements">All articles with unsourced statements</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_August_2013" title="Category:Articles with unsourced statements from August 2013">Articles with unsourced statements from August 2013</a></li><li><a href="/wiki/Category:Wikipedia_articles_needing_clarification_from_September_2014" title="Category:Wikipedia articles needing clarification from September 2014">Wikipedia articles needing clarification from September 2014</a></li><li><a href="/wiki/Category:Wikipedia_external_links_cleanup_from_October_2018" title="Category:Wikipedia external links cleanup from October 2018">Wikipedia external links cleanup from October 2018</a></li><li><a href="/wiki/Category:Webarchive_template_wayback_links" title="Category:Webarchive template wayback links">Webarchive template wayback links</a></li><li><a href="/wiki/Category:Articles_with_example_C%2B%2B_code" title="Category:Articles with example C++ code">Articles with example C++ code</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 23 September 2024, at 17:01<span class="anonymous-show">&#160;(UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=C%2B%2B11&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-f69cdc8f6-k5cx6","wgBackendResponseTime":165,"wgPageParseReport":{"limitreport":{"cputime":"1.108","walltime":"4.309","ppvisitednodes":{"value":3235,"limit":1000000},"postexpandincludesize":{"value":126494,"limit":2097152},"templateargumentsize":{"value":1893,"limit":2097152},"expansiondepth":{"value":12,"limit":100},"expensivefunctioncount":{"value":88,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":238322,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 3978.654 1 -total"," 7.01% 278.708 1 Template:Reflist"," 5.95% 236.552 26 Template:Cite_web"," 3.50% 139.333 1 Template:Short_description"," 2.79% 111.131 1 Template:C++_language_revisions"," 2.69% 106.902 1 Template:Sidebar"," 2.46% 97.814 2 Template:Pagetype"," 1.74% 69.152 1 Template:Condensed"," 1.66% 66.168 3 Template:Ambox"," 1.66% 66.141 4 Template:Code"]},"scribunto":{"limitreport-timeusage":{"value":"0.526","limit":"10.000"},"limitreport-memusage":{"value":6984122,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-f69cdc8f6-9j6r5","timestamp":"20241122141948","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"C++11","url":"https:\/\/en.wikipedia.org\/wiki\/C%2B%2B11","sameAs":"http:\/\/www.wikidata.org\/entity\/Q1061570","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q1061570","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2006-06-08T19:13:00Z","dateModified":"2024-09-23T17:01:06Z","headline":"2011 edition of the C++ programming language standard"}</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10