CINXE.COM
C++11 — Wikipédia
<!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="fr" dir="ltr"> <head> <meta charset="UTF-8"> <title>C++11 — Wikipédia</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(/(?:^|; )frwikimwclientpreferences=([^;]+)/);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":[",\t."," \t,"],"wgDigitTransformTable":["",""], "wgDefaultDateFormat":"dmy","wgMonthNames":["","janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],"wgRequestId":"46d1392d-ba44-4b3a-b352-3df09ea7751b","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"C++11","wgTitle":"C++11","wgCurRevisionId":219007527,"wgRevisionId":219007527,"wgArticleId":2482644,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Page utilisant P571","Page utilisant des données de Wikidata à traduire de l'anglais","Page utilisant P737","Page utilisant P856","Article utilisant une Infobox","Article contenant un appel à traduction en anglais","Article à référence nécessaire","Portail:Programmation informatique/Articles liés","Portail:Informatique/Articles liés","Langage de programmation","Langage orienté objet","Norme ISO","C++"],"wgPageViewLanguage":"fr","wgPageContentLanguage":"fr", "wgPageContentModel":"wikitext","wgRelevantPageName":"C++11","wgRelevantArticleId":2482644,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"fr","pageLanguageDir":"ltr","pageVariantFallbacks":"fr"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":50000,"wgRelatedArticlesCompat":[],"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","ext.math.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"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","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ArchiveLinks","ext.gadget.Wdsearch","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.quicksurveys.init","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=fr&modules=ext.cite.styles%7Cext.math.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=fr&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=fr&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <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 — Wikipédia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//fr.m.wikipedia.org/wiki/C%2B%2B11"> <link rel="alternate" type="application/x-wiki" title="Modifier" href="/w/index.php?title=C%2B%2B11&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="Wikipédia (fr)"> <link rel="EditURI" type="application/rsd+xml" href="//fr.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://fr.wikipedia.org/wiki/C%2B%2B11"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.fr"> <link rel="alternate" type="application/atom+xml" title="Flux Atom de Wikipédia" href="/w/index.php?title=Sp%C3%A9cial:Modifications_r%C3%A9centes&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">Aller au contenu</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="Menu principal" > <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">Menu principal</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">Menu principal</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">déplacer vers la barre latérale</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">masquer</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/Wikip%C3%A9dia:Accueil_principal" title="Accueil général [z]" accesskey="z"><span>Accueil</span></a></li><li id="n-thema" class="mw-list-item"><a href="/wiki/Portail:Accueil"><span>Portails thématiques</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Sp%C3%A9cial:Page_au_hasard" title="Affiche un article au hasard [x]" accesskey="x"><span>Article au hasard</span></a></li><li id="n-contact" class="mw-list-item"><a href="/wiki/Wikip%C3%A9dia:Contact"><span>Contact</span></a></li> </ul> </div> </div> <div id="p-Contribuer" class="vector-menu mw-portlet mw-portlet-Contribuer" > <div class="vector-menu-heading"> Contribuer </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-aboutwp" class="mw-list-item"><a href="/wiki/Aide:D%C3%A9buter"><span>Débuter sur Wikipédia</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/Aide:Accueil" title="Accès à l’aide"><span>Aide</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikip%C3%A9dia:Accueil_de_la_communaut%C3%A9" title="À propos du projet, ce que vous pouvez faire, où trouver les informations"><span>Communauté</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Sp%C3%A9cial:Modifications_r%C3%A9centes" title="Liste des modifications récentes sur le wiki [r]" accesskey="r"><span>Modifications récentes</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Wikip%C3%A9dia:Accueil_principal" 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="Wikipédia" src="/static/images/mobile/copyright/wikipedia-wordmark-fr.svg" style="width: 7.4375em; height: 1.125em;"> <img class="mw-logo-tagline" alt="l'encyclopédie libre" src="/static/images/mobile/copyright/wikipedia-tagline-fr.svg" width="120" height="13" style="width: 7.5em; 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/Sp%C3%A9cial:Recherche" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Rechercher sur Wikipédia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Rechercher</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="Rechercher sur Wikipédia" aria-label="Rechercher sur Wikipédia" autocapitalize="sentences" title="Rechercher sur Wikipédia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Spécial:Recherche"> </div> <button class="cdx-button cdx-search-input__end-button">Rechercher</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Outils personnels"> <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="Apparence"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Modifier l'apparence de la taille, de la largeur et de la couleur de la police de la page" > <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="Apparence" > <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">Apparence</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="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_fr.wikipedia.org&uselang=fr" class=""><span>Faire un don</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=Sp%C3%A9cial:Cr%C3%A9er_un_compte&returnto=C%2B%2B11" title="Nous vous encourageons à créer un compte utilisateur et vous connecter ; ce n’est cependant pas obligatoire." class=""><span>Créer un compte</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=Sp%C3%A9cial:Connexion&returnto=C%2B%2B11" title="Nous vous encourageons à vous connecter ; ce n’est cependant pas obligatoire. [o]" accesskey="o" class=""><span>Se connecter</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="Plus d’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="Outils personnels" > <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">Outils personnels</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="Menu utilisateur" > <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="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_fr.wikipedia.org&uselang=fr"><span>Faire un don</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Sp%C3%A9cial:Cr%C3%A9er_un_compte&returnto=C%2B%2B11" title="Nous vous encourageons à créer un compte utilisateur et vous connecter ; ce n’est cependant pas obligatoire."><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Créer un compte</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Sp%C3%A9cial:Connexion&returnto=C%2B%2B11" title="Nous vous encourageons à vous connecter ; ce n’est cependant pas obligatoire. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Se connecter</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 pour les contributeurs déconnectés <a href="/wiki/Aide:Premiers_pas" aria-label="En savoir plus sur la contribution"><span>en savoir plus</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/Sp%C3%A9cial:Mes_contributions" title="Une liste des modifications effectuées depuis cette adresse IP [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Sp%C3%A9cial:Mes_discussions" title="La page de discussion pour les contributions depuis cette adresse IP [n]" accesskey="n"><span>Discussion</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="Sommaire" 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">Sommaire</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">déplacer vers la barre latérale</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">masquer</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">Début</div> </a> </li> <li id="toc-Changements_prévus_pour_la_mise_à_jour_de_la_norme" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Changements_prévus_pour_la_mise_à_jour_de_la_norme"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Changements prévus pour la mise à jour de la norme</span> </div> </a> <ul id="toc-Changements_prévus_pour_la_mise_à_jour_de_la_norme-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Extensions_du_langage" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Extensions_du_langage"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Extensions du langage</span> </div> </a> <button aria-controls="toc-Extensions_du_langage-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>Afficher / masquer la sous-section Extensions du langage</span> </button> <ul id="toc-Extensions_du_langage-sublist" class="vector-toc-list"> <li id="toc-Multitâche" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Multitâche"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Multitâche</span> </div> </a> <ul id="toc-Multitâche-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Les_classes" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Les_classes"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Les classes</span> </div> </a> <ul id="toc-Les_classes-sublist" class="vector-toc-list"> <li id="toc-Délégation_du_constructeur_[4]" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Délégation_du_constructeur_[4]"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2.1</span> <span>Délégation du constructeur <sup><span>[</span>4<span>]</span></sup></span> </div> </a> <ul id="toc-Délégation_du_constructeur_[4]-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Héritage_du_constructeur_[5]" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Héritage_du_constructeur_[5]"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2.2</span> <span>Héritage du constructeur <sup><span>[</span>5<span>]</span></sup></span> </div> </a> <ul id="toc-Héritage_du_constructeur_[5]-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Initialiseurs_d'attributs" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Initialiseurs_d'attributs"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2.3</span> <span>Initialiseurs d'attributs</span> </div> </a> <ul id="toc-Initialiseurs_d'attributs-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Sizeof_sur_les_attributs_de_classes_sans_objet_explicite" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Sizeof_sur_les_attributs_de_classes_sans_objet_explicite"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2.4</span> <span>Sizeof sur les attributs de classes sans objet explicite</span> </div> </a> <ul id="toc-Sizeof_sur_les_attributs_de_classes_sans_objet_explicite-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Liste_d'initialiseurs_[6]" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Liste_d'initialiseurs_[6]"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2.5</span> <span>Liste d'initialiseurs <sup><span>[</span>6<span>]</span></sup></span> </div> </a> <ul id="toc-Liste_d'initialiseurs_[6]-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Les_templates" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Les_templates"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>Les templates</span> </div> </a> <ul id="toc-Les_templates-sublist" class="vector-toc-list"> <li id="toc-Les_templates_variadiques_[7],[8]" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Les_templates_variadiques_[7],[8]"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.1</span> <span>Les templates variadiques <sup><span>[</span>7<span>]</span></sup><sup>,</sup><sup><span>[</span>8<span>]</span></sup></span> </div> </a> <ul id="toc-Les_templates_variadiques_[7],[8]-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Les_concepts" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Les_concepts"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.2</span> <span>Les concepts</span> </div> </a> <ul id="toc-Les_concepts-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Les_chevrons_(<>)_[10]" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Les_chevrons_(<>)_[10]"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.3</span> <span>Les chevrons (<span><></span>) <sup><span>[</span>10<span>]</span></sup></span> </div> </a> <ul id="toc-Les_chevrons_(<>)_[10]-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Template_externe_[11]" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Template_externe_[11]"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3.4</span> <span>Template externe <sup><span>[</span>11<span>]</span></sup></span> </div> </a> <ul id="toc-Template_externe_[11]-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Autres_nouvelles_fonctionnalités_du_C++11" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Autres_nouvelles_fonctionnalités_du_C++11"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>Autres nouvelles fonctionnalités du C++11</span> </div> </a> <ul id="toc-Autres_nouvelles_fonctionnalités_du_C++11-sublist" class="vector-toc-list"> <li id="toc-Assertions_statiques_[12]" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Assertions_statiques_[12]"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.1</span> <span>Assertions statiques <sup><span>[</span>12<span>]</span></sup></span> </div> </a> <ul id="toc-Assertions_statiques_[12]-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Inférence_de_types_[13]" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Inférence_de_types_[13]"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.2</span> <span>Inférence de types <sup><span>[</span>13<span>]</span></sup></span> </div> </a> <ul id="toc-Inférence_de_types_[13]-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Expressions_et_fonctions_lambda_[14],[15],[16]" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Expressions_et_fonctions_lambda_[14],[15],[16]"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.3</span> <span>Expressions et fonctions lambda <sup><span>[</span>14<span>]</span></sup><sup>,</sup><sup><span>[</span>15<span>]</span></sup><sup>,</sup><sup><span>[</span>16<span>]</span></sup></span> </div> </a> <ul id="toc-Expressions_et_fonctions_lambda_[14],[15],[16]-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Sémantique_des_RValues_Reference/Move" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Sémantique_des_RValues_Reference/Move"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.4</span> <span>Sémantique des RValues Reference/Move</span> </div> </a> <ul id="toc-Sémantique_des_RValues_Reference/Move-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Énumérations_fortement_typées_[17]" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Énumérations_fortement_typées_[17]"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.5</span> <span>Énumérations fortement typées <sup><span>[</span>17<span>]</span></sup></span> </div> </a> <ul id="toc-Énumérations_fortement_typées_[17]-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Boucles_basées_sur_des_intervalles_[18]" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Boucles_basées_sur_des_intervalles_[18]"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.6</span> <span>Boucles basées sur des intervalles <sup><span>[</span>18<span>]</span></sup></span> </div> </a> <ul id="toc-Boucles_basées_sur_des_intervalles_[18]-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Littéraux_définis_par_l'utilisateur_[19]" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Littéraux_définis_par_l'utilisateur_[19]"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.7</span> <span>Littéraux définis par l'utilisateur <sup><span>[</span>19<span>]</span></sup></span> </div> </a> <ul id="toc-Littéraux_définis_par_l'utilisateur_[19]-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Pointeur_NULL_[20]" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Pointeur_NULL_[20]"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4.8</span> <span>Pointeur <span>NULL</span> <sup><span>[</span>20<span>]</span></sup></span> </div> </a> <ul id="toc-Pointeur_NULL_[20]-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </li> <li id="toc-Extension_de_la_bibliothèque_standard" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Extension_de_la_bibliothèque_standard"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Extension de la bibliothèque standard</span> </div> </a> <button aria-controls="toc-Extension_de_la_bibliothèque_standard-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>Afficher / masquer la sous-section Extension de la bibliothèque standard</span> </button> <ul id="toc-Extension_de_la_bibliothèque_standard-sublist" class="vector-toc-list"> <li id="toc-Threads" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Threads"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.1</span> <span>Threads</span> </div> </a> <ul id="toc-Threads-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Type_tuple" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Type_tuple"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2</span> <span>Type tuple</span> </div> </a> <ul id="toc-Type_tuple-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Table_de_hachage" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Table_de_hachage"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3</span> <span>Table de hachage</span> </div> </a> <ul id="toc-Table_de_hachage-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Expressions_rationnelles" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Expressions_rationnelles"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.4</span> <span>Expressions rationnelles</span> </div> </a> <ul id="toc-Expressions_rationnelles-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Amélioration_des_nombres_aléatoires_extensibles" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Amélioration_des_nombres_aléatoires_extensibles"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.5</span> <span>Amélioration des nombres aléatoires extensibles</span> </div> </a> <ul id="toc-Amélioration_des_nombres_aléatoires_extensibles-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Fonctions_mathématiques_spéciales" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Fonctions_mathématiques_spéciales"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.6</span> <span>Fonctions mathématiques spéciales</span> </div> </a> <ul id="toc-Fonctions_mathématiques_spéciales-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Notes_et_références" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Notes_et_références"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Notes et références</span> </div> </a> <button aria-controls="toc-Notes_et_références-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>Afficher / masquer la sous-section Notes et références</span> </button> <ul id="toc-Notes_et_références-sublist" class="vector-toc-list"> <li id="toc-Notes" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Notes"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>Notes</span> </div> </a> <ul id="toc-Notes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Références" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Références"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2</span> <span>Références</span> </div> </a> <ul id="toc-Références-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Voir_aussi" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Voir_aussi"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Voir aussi</span> </div> </a> <button aria-controls="toc-Voir_aussi-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>Afficher / masquer la sous-section Voir aussi</span> </button> <ul id="toc-Voir_aussi-sublist" class="vector-toc-list"> <li id="toc-Articles_connexes" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Articles_connexes"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.1</span> <span>Articles connexes</span> </div> </a> <ul id="toc-Articles_connexes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Liens_externes" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Liens_externes"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.2</span> <span>Liens externes</span> </div> </a> <ul id="toc-Liens_externes-sublist" class="vector-toc-list"> </ul> </li> </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="Sommaire" 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="Basculer la table des matières" > <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">Basculer la table des matières</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="Aller à un article dans une autre langue. Disponible en 21 langues." > <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-21" 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">21 langues</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 – arabe" lang="ar" hreflang="ar" data-title="سي++11" data-language-autonym="العربية" data-language-local-name="arabe" 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 – tchèque" lang="cs" hreflang="cs" data-title="C++11" data-language-autonym="Čeština" data-language-local-name="tchèque" 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 – allemand" lang="de" hreflang="de" data-title="C++11" data-language-autonym="Deutsch" data-language-local-name="allemand" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikipedia.org/wiki/C%2B%2B11" title="C++11 – anglais" lang="en" hreflang="en" data-title="C++11" data-language-autonym="English" data-language-local-name="anglais" class="interlanguage-link-target"><span>English</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 – espagnol" lang="es" hreflang="es" data-title="C++11" data-language-autonym="Español" data-language-local-name="espagnol" 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="سیپلاسپلاس ۱۱ – persan" lang="fa" hreflang="fa" data-title="سیپلاسپلاس ۱۱" data-language-autonym="فارسی" data-language-local-name="persan" class="interlanguage-link-target"><span>فارسی</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 – finnois" lang="fi" hreflang="fi" data-title="C++11" data-language-autonym="Suomi" data-language-local-name="finnois" class="interlanguage-link-target"><span>Suomi</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 – arménien" lang="hy" hreflang="hy" data-title="C++11" data-language-autonym="Հայերեն" data-language-local-name="arménien" 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 – italien" lang="it" hreflang="it" data-title="C++11" data-language-autonym="Italiano" data-language-local-name="italien" 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 – japonais" lang="ja" hreflang="ja" data-title="C++11" data-language-autonym="日本語" data-language-local-name="japonais" class="interlanguage-link-target"><span>日本語</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 – coréen" lang="ko" hreflang="ko" data-title="C++11" data-language-autonym="한국어" data-language-local-name="coréen" 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 – norvégien bokmål" lang="nb" hreflang="nb" data-title="C++11" data-language-autonym="Norsk bokmål" data-language-local-name="norvégien 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 – polonais" lang="pl" hreflang="pl" data-title="C++11" data-language-autonym="Polski" data-language-local-name="polonais" 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 – portugais" lang="pt" hreflang="pt" data-title="C++11" data-language-autonym="Português" data-language-local-name="portugais" 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 – russe" lang="ru" hreflang="ru" data-title="C++11" data-language-autonym="Русский" data-language-local-name="russe" 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. – serbe" lang="sr" hreflang="sr" data-title="Нацрт C++0x од марта 2010." data-language-autonym="Српски / srpski" data-language-local-name="serbe" class="interlanguage-link-target"><span>Српски / srpski</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 – thaï" lang="th" hreflang="th" data-title="ภาษาซีพลัสพลัส11" data-language-autonym="ไทย" data-language-local-name="thaï" 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 – ukrainien" lang="uk" hreflang="uk" data-title="C++11" data-language-autonym="Українська" data-language-local-name="ukrainien" 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 – vietnamien" lang="vi" hreflang="vi" data-title="C++11" data-language-autonym="Tiếng Việt" data-language-local-name="vietnamien" 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 – chinois" lang="zh" hreflang="zh" data-title="C++11" data-language-autonym="中文" data-language-local-name="chinois" 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="Modifier les liens interlangues" class="wbc-editpage">Modifier les liens</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="Espaces de noms"> <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="Voir le contenu de la page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Discussion:C%2B%2B11" rel="discussion" title="Discussion au sujet de cette page de contenu [t]" accesskey="t"><span>Discussion</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="Modifier la variante de langue" > <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">français</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="Affichages"> <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>Lire</span></a></li><li id="ca-ve-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=C%2B%2B11&veaction=edit" title="Modifier cette page [v]" accesskey="v"><span>Modifier</span></a></li><li id="ca-edit" class="collapsible vector-tab-noicon mw-list-item"><a href="/w/index.php?title=C%2B%2B11&action=edit" title="Modifier le wikicode de cette page [e]" accesskey="e"><span>Modifier le code</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=C%2B%2B11&action=history" title="Historique des versions de cette page [h]" accesskey="h"><span>Voir l’historique</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Outils de la page"> <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="Outils" > <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">Outils</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">Outils</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">déplacer vers la barre latérale</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">masquer</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="Plus d’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>Lire</span></a></li><li id="ca-more-ve-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=C%2B%2B11&veaction=edit" title="Modifier cette page [v]" accesskey="v"><span>Modifier</span></a></li><li id="ca-more-edit" class="collapsible vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=C%2B%2B11&action=edit" title="Modifier le wikicode de cette page [e]" accesskey="e"><span>Modifier le code</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&action=history"><span>Voir l’historique</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> Général </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Sp%C3%A9cial:Pages_li%C3%A9es/C%2B%2B11" title="Liste des pages liées qui pointent sur celle-ci [j]" accesskey="j"><span>Pages liées</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Sp%C3%A9cial:Suivi_des_liens/C%2B%2B11" rel="nofollow" title="Liste des modifications récentes des pages appelées par celle-ci [k]" accesskey="k"><span>Suivi des pages liées</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Aide:Importer_un_fichier" title="Téléverser des fichiers [u]" accesskey="u"><span>Téléverser un fichier</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Sp%C3%A9cial:Pages_sp%C3%A9ciales" title="Liste de toutes les pages spéciales [q]" accesskey="q"><span>Pages spéciales</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=C%2B%2B11&oldid=219007527" title="Adresse permanente de cette version de cette page"><span>Lien permanent</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=C%2B%2B11&action=info" title="Davantage d’informations sur cette page"><span>Informations sur la page</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Sp%C3%A9cial:Citer&page=C%2B%2B11&id=219007527&wpFormIdentifier=titleform" title="Informations sur la manière de citer cette page"><span>Citer cette page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Sp%C3%A9cial:UrlShortener&url=https%3A%2F%2Ffr.wikipedia.org%2Fwiki%2FC%252B%252B11"><span>Obtenir l'URL raccourcie</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Sp%C3%A9cial:QrCode&url=https%3A%2F%2Ffr.wikipedia.org%2Fwiki%2FC%252B%252B11"><span>Télécharger le code QR</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"> Imprimer / exporter </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-create_a_book" class="mw-list-item"><a href="/w/index.php?title=Sp%C3%A9cial:Livre&bookcmd=book_creator&referer=C%2B%2B11"><span>Créer un livre</span></a></li><li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Sp%C3%A9cial:DownloadAsPdf&page=C%2B%2B11&action=show-download-screen"><span>Télécharger comme PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=C%2B%2B11&printable=yes" title="Version imprimable de cette page [p]" accesskey="p"><span>Version imprimable</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"> Dans d’autres projets </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="Lien vers l’élément dans le dépôt de données connecté [g]" accesskey="g"><span>Élément Wikidata</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="Outils de la page"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Apparence"> <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">Apparence</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">déplacer vers la barre latérale</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">masquer</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">Un article de Wikipédia, l'encyclopédie libre.</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="fr" dir="ltr"><p class="mw-empty-elt"> </p> <table class="infobox_v2 infobox infobox--frwiki noarchive"> <tbody><tr> <td colspan="2" class="entete informatique" style="background-color:#EEEEEE;color:black;">C++11<style data-mw-deduplicate="TemplateStyles:r188801372">.mw-parser-output .entete.informatique{background-image:url("//upload.wikimedia.org/wikipedia/commons/a/ae/Picto-infoboxinfo.png")}</style> </td></tr> <tr><th scope="row">Date de première version </th> <td><span class="wd_p571"><time class="nowrap date-lien" datetime="2011-08-12" data-sort-value="2011-08-12"><a href="/wiki/12_ao%C3%BBt" title="12 août">12</a> <a href="/wiki/Ao%C3%BBt_2011" title="Août 2011">août</a> <a href="/wiki/2011" title="2011">2011</a></time><span class="noprint wikidata-linkback skin-invert"><span class="mw-valign-baseline noviewer" typeof="mw:File"><a href="https://www.wikidata.org/wiki/Q1061570?uselang=fr#P571" title="Voir et modifier les données sur Wikidata"><img alt="Voir et modifier les données sur Wikidata" src="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/10px-Blue_pencil.svg.png" decoding="async" width="10" height="10" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/15px-Blue_pencil.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/20px-Blue_pencil.svg.png 2x" data-file-width="600" data-file-height="600" /></a></span></span></span> </td> </tr> <tr> <th scope="row">Influencé par </th> <td><span class="wd_p737">C++ Technical Report 1 <small>(<a href="https://en.wikipedia.org/wiki/C%2B%2B_Technical_Report_1" class="extiw" title="en:C++ Technical Report 1"><span class="indicateur-langue" title="Article sur Wikipédia en anglais">en</span></a>)</small><span class="noprint wikidata-linkback skin-invert"><span class="mw-valign-baseline noviewer" typeof="mw:File"><a href="https://www.wikidata.org/wiki/Q1061570?uselang=fr#P737" title="Voir et modifier les données sur Wikidata"><img alt="Voir et modifier les données sur Wikidata" src="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/10px-Blue_pencil.svg.png" decoding="async" width="10" height="10" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/15px-Blue_pencil.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/20px-Blue_pencil.svg.png 2x" data-file-width="600" data-file-height="600" /></a></span></span></span> </td> </tr> <tr> <th scope="row"><a href="/wiki/Site_web" title="Site web">Site web</a> </th> <td><span class="wd_p856"><a rel="nofollow" class="external text" href="https://www.iso.org/standard/50372.html">www.iso.org/standard/50372.html</a><span class="noprint wikidata-linkback skin-invert"><span class="mw-valign-baseline noviewer" typeof="mw:File"><a href="https://www.wikidata.org/wiki/Q1061570?uselang=fr#P856" title="Voir et modifier les données sur Wikidata"><img alt="Voir et modifier les données sur Wikidata" src="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/10px-Blue_pencil.svg.png" decoding="async" width="10" height="10" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/15px-Blue_pencil.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/20px-Blue_pencil.svg.png 2x" data-file-width="600" data-file-height="600" /></a></span></span></span> </td> </tr> <tr> <td class="navigation-only" colspan="2" style="border-top: 2px #EEEEEE solid; font-size: 80%; background:inherit; color: inherit; text-align: right;"><span class="plainlinks" style="float:left;"><a class="external text" href="https://fr.wikipedia.org/w/index.php?title=C%2B%2B11&action=edit&section=0"><span class="infodoc">modifier</span></a></span> <span typeof="mw:File"><a href="/wiki/Mod%C3%A8le:Infobox_Langage_de_programmation" title="Consultez la documentation du modèle"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/38/Info_Simple.svg/12px-Info_Simple.svg.png" decoding="async" width="12" height="12" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/38/Info_Simple.svg/18px-Info_Simple.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/38/Info_Simple.svg/24px-Info_Simple.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></td> </tr> </tbody></table> <p><b>C++11</b>, anciennement connu sous le nom de <b>C++0x</b><sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite_crochet">[</span>1<span class="cite_crochet">]</span></a></sup>, est une norme pour le <a href="/wiki/C%2B%2B" title="C++">langage C++</a> en <a href="/wiki/Informatique" title="Informatique">informatique</a>. Elle a été approuvée unanimement le <time class="nowrap" datetime="2011-08-12" data-sort-value="2011-08-12">12 août 2011</time><sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite_crochet">[</span>2<span class="cite_crochet">]</span></a></sup>. Elle remplace la précédente <a href="/wiki/Norme" title="Norme">norme</a>, ISO/CEI 14882, publiée en <time>1998</time> et mise à jour en <time>2003</time>. Ces dernières sont plus connues sous les noms informels de <a href="/wiki/C%2B%2B98" class="mw-redirect" title="C++98">C++98</a> et <a href="/wiki/C%2B%2B03" class="mw-redirect" title="C++03">C++03</a>. C++11 introduit plusieurs nouveautés au langage initial, ainsi que de nouvelles fonctionnalités à la <a href="/wiki/Biblioth%C3%A8que_standard_du_C%2B%2B" title="Bibliothèque standard du C++">bibliothèque standard du C++</a> comme la plupart des <a href="/wiki/Biblioth%C3%A8que_logicielle" title="Bibliothèque logicielle">bibliothèques</a> du Technical Report 1, à l'exception de la bibliothèque de <a href="/wiki/Fonction_(math%C3%A9matiques)" title="Fonction (mathématiques)">fonctions mathématiques</a> spéciales. </p><p>C++11 a été publié sous le nom de ISO/CEI 14882:2011 en <time class="nowrap" datetime="2011-09" data-sort-value="2011-09">septembre 2011</time>. Une version payante est disponible sur le site de l'<a href="/wiki/ISO" class="mw-redirect" title="ISO">ISO</a><sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite_crochet">[</span>3<span class="cite_crochet">]</span></a></sup>. Le dernier <i>working draft</i> gratuit est le <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf">N3337</a>, qui date du <time class="nowrap" datetime="2012-01-12" data-sort-value="2012-01-12">12 janvier 2012</time>, les seules différences avec le standard étant des corrections éditoriales. </p><p>Un <a href="/wiki/Langage_de_programmation" title="Langage de programmation">langage de programmation</a> comme le C++ suit une évolution qui permet aux programmeurs de coder plus rapidement, de façon plus élégante et permettant de faire du code maintenable. Ce processus soulève inévitablement des questions de compatibilité avec le <a href="/wiki/Code_source" title="Code source">code</a> existant, ce qui s'est produit de temps en temps pendant le processus de développement du C++. Cependant, d'après l'annonce faite par <a href="/wiki/Bjarne_Stroustrup" title="Bjarne Stroustrup">Bjarne Stroustrup</a>, inventeur du langage C++ et membre du comité, la nouvelle norme est presque totalement compatible avec la norme précédente. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Changements_prévus_pour_la_mise_à_jour_de_la_norme"><span id="Changements_pr.C3.A9vus_pour_la_mise_.C3.A0_jour_de_la_norme"></span>Changements prévus pour la mise à jour de la norme</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=1" title="Modifier la section : Changements prévus pour la mise à jour de la norme" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=1" title="Modifier le code source de la section : Changements prévus pour la mise à jour de la norme"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Les changements du langage C++ concernent aussi bien le langage initial que la <a href="/wiki/Biblioth%C3%A8que_standard" title="Bibliothèque standard">bibliothèque standard</a>. Durant le développement de chaque fonctionnalité de la nouvelle norme, le comité a appliqué les directives suivantes : </p> <ul><li>Garder la stabilité et la compatibilité avec le C++98 et, si possible, avec le <a href="/wiki/C_(langage)" title="C (langage)">langage C</a>.</li> <li>Préférer l'introduction de nouvelles fonctionnalités par la bibliothèque standard, plutôt que par le langage lui-même.</li> <li>Préférer les changements qui peuvent faire évoluer les techniques de programmation.</li> <li>Améliorer le C++ pour faciliter la mise en place de systèmes et de bibliothèques, plutôt qu'introduire de nouvelles fonctionnalités seulement utiles pour des applications spécifiques.</li> <li>Augmenter la protection des types en fournissant des alternatives plus sécurisées que les actuelles, plutôt non sécurisées.</li> <li>Augmenter les performances et les capacités à travailler directement avec le matériel.</li> <li>Proposer des solutions propres aux problèmes actuels.</li> <li>Implémenter le principe du « <a href="/w/index.php?title=Zero-overhead&action=edit&redlink=1" class="new" title="Zero-overhead (page inexistante)">zero-overhead</a> » (on ne paye le coût d'une fonctionnalité que si l'on s'en sert).</li> <li>Rendre le C++ facile à apprendre et à enseigner sans enlever les fonctionnalités requises par les programmeurs experts.</li></ul> <div class="mw-heading mw-heading2"><h2 id="Extensions_du_langage">Extensions du langage</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=2" title="Modifier la section : Extensions du langage" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=2" title="Modifier le code source de la section : Extensions du langage"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Multitâche"><span id="Multit.C3.A2che"></span>Multitâche</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=3" title="Modifier la section : Multitâche" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=3" title="Modifier le code source de la section : Multitâche"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>La mémoire locale de thread ou <a href="/wiki/Thread_Local_Storage" title="Thread Local Storage">Thread Local Storage</a> n'est pas un concept inventé par la nouvelle norme : de nombreux compilateurs proposent déjà cette fonctionnalité, ainsi que la bibliothèque threads de <a href="/wiki/Boost_(biblioth%C3%A8ques)" title="Boost (bibliothèques)">Boost</a>. C++11 introduit le mot-clef <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">thread_local</span></code> pour déclarer qu'une variable doit être stockée dans une zone mémoire appartenant au thread. Chaque thread embarque ainsi sa propre copie d'une variable déclarée de la sorte, et les modifications d'une de ces copies n'affectent pas les copies appartenant aux autres threads. Lorsqu'une variable statique (ou une variable de classe) est ainsi définie, sa durée de vie est alors réduite à celle du thread (le destructeur des objets, notamment, est appelé lorsque le thread s'achève). </p> <div class="mw-heading mw-heading3"><h3 id="Les_classes">Les classes</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=4" title="Modifier la section : Les classes" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=4" title="Modifier le code source de la section : Les classes"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading4"><h4 id="Délégation_du_constructeur_[4]"><span id="D.C3.A9l.C3.A9gation_du_constructeur_.5B4.5D"></span>Délégation du constructeur <sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite_crochet">[</span>4<span class="cite_crochet">]</span></a></sup></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=5" title="Modifier la section : Délégation du constructeur [4]" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=5" title="Modifier le code source de la section : Délégation du constructeur [4]"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>En C++03, un constructeur appartenant à une classe ne peut pas appeler un autre constructeur de cette même classe, ce qui peut entraîner de la duplication de code lors de l'initialisation de ses attributs. En permettant au constructeur de déléguer la création d'une instance à un autre constructeur, C++11 apporte donc une solution. </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">une_classe</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">nombre</span><span class="p">;</span> <span class="k">public</span><span class="o">:</span> <span class="w"> </span><span class="n">une_classe</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">nouveau_nombre</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">nombre</span><span class="p">(</span><span class="n">nouveau_nombre</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span> <span class="w"> </span><span class="n">une_classe</span><span class="p">()</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">une_classe</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>Dans l'exemple ci-dessus, on peut voir que le second constructeur appelle le premier constructeur, ce qui aurait conduit à une erreur de compilation en C++03. </p> <div class="mw-heading mw-heading4"><h4 id="Héritage_du_constructeur_[5]"><span id="H.C3.A9ritage_du_constructeur_.5B5.5D"></span>Héritage du constructeur <sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite_crochet">[</span>5<span class="cite_crochet">]</span></a></sup></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=6" title="Modifier la section : Héritage du constructeur [5]" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=6" title="Modifier le code source de la section : Héritage du constructeur [5]"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>En C++03, les constructeurs d'une classe de base ne sont pas hérités par ses classes dérivées. C++11 permet d'hériter explicitement des constructeurs de la classe de base grâce à l'instruction <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">using</span></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">classe_base</span><span class="w"> </span><span class="p">{</span> <span class="k">public</span><span class="o">:</span> <span class="w"> </span><span class="n">classe_base</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">nombre</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">m_nombre</span><span class="p">(</span><span class="n">nombre</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">m_nombre</span><span class="p">;</span> <span class="p">};</span> <span class="k">class</span><span class="w"> </span><span class="nc">classe_derive</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">classe_base</span><span class="w"> </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">classe_base</span><span class="o">::</span><span class="n">classe_base</span><span class="p">;</span> <span class="p">};</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Initialiseurs_d'attributs"><span id="Initialiseurs_d.27attributs"></span>Initialiseurs d'attributs</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=7" title="Modifier la section : Initialiseurs d'attributs" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=7" title="Modifier le code source de la section : Initialiseurs d'attributs"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>En C++03, il est possible d'assigner une valeur par défaut aux variables constantes directement dans le fichier d'en-tête. C++11 étend cette possibilité aux attributs des classes. Par exemple il est désormais tout à fait possible d'écrire: </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">UneClasse</span><span class="w"> </span><span class="p">{</span> <span class="k">public</span><span class="o">:</span> <span class="w"> </span><span class="n">UneClasse</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">UneClasse</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">valeur</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">m_valeur</span><span class="p">(</span><span class="n">valeur</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span> <span class="w"> </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">m_valeur</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>Dans ce code, tous les constructeurs de la classe vont initialiser <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">m_valeur</span></code> à 5, si le constructeur ne remplace pas l'initialisation avec la sienne. Par exemple, le constructeur vide ci-dessus va initialiser <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">m_valeur</span></code> à 5 selon la définition de la classe, mais le constructeur qui prend un <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">int</span></code> en paramètre initialisera <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">m_valeur</span></code> à ce paramètre. Il est également possible d'utiliser d'autres attributs dans l'initialisation, et d'utiliser un constructeur ou l'utilisation uniforme au lieu de l'initialisation par assignation. </p> <div class="mw-heading mw-heading4"><h4 id="Sizeof_sur_les_attributs_de_classes_sans_objet_explicite">Sizeof sur les attributs de classes sans objet explicite</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=8" title="Modifier la section : Sizeof sur les attributs de classes sans objet explicite" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=8" title="Modifier le code source de la section : Sizeof sur les attributs de classes sans objet explicite"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>En C++03, <a href="/wiki/Sizeof" title="Sizeof"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">sizeof</span></code></a> peut être utilisé sur des types ou des objets, mais pas sur un membre de classe (excepté dans la bibliothèque Qt). C++11 le rend possible. On peut donc maintenant faire : </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">UnType</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">UnAutreType</span><span class="w"> </span><span class="n">membre</span><span class="p">;</span><span class="w"> </span><span class="p">};</span> <span class="w"> </span> <span class="k">sizeof</span><span class="p">(</span><span class="n">UnType</span><span class="o">::</span><span class="n">membre</span><span class="p">);</span><span class="w"> </span><span class="c1">// Fonctionne en C++11, mais pas en C++03</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Liste_d'initialiseurs_[6]"><span id="Liste_d.27initialiseurs_.5B6.5D"></span>Liste d'initialiseurs <sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite_crochet">[</span>6<span class="cite_crochet">]</span></a></sup></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=9" title="Modifier la section : Liste d'initialiseurs [6]" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=9" title="Modifier le code source de la section : Liste d'initialiseurs [6]"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div><p> Pour initialiser un conteneur à l'aide de valeurs connues, il fallait le faire élément par élément. C++11 introduit le patron de classe <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">std</span><span class="o">::</span><span class="n">initializer_list</span></code> qui permet d'initialiser les conteneurs avec une suite de valeurs entre accolades, autrement dit avec la même syntaxe que celle permettant en C d'initialiser les tableaux.</p><div class="mw-highlight mw-highlight-lang-c++ mw-content-ltr" dir="ltr"><pre><span></span><span class="kt">int</span><span class="w"> </span><span class="nf">sum</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">initializer_list</span><span class="o"><</span><span class="kt">int</span><span class="o">></span><span class="w"> </span><span class="o">&</span><span class="n">list</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">sum</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="k">for</span><span class="w"> </span><span class="p">(</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="n">list</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="n">sum</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">i</span><span class="p">;</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">sum</span><span class="p">;</span> <span class="p">}</span> <span class="n">sum</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="w"> </span><span class="c1">// 15</span> <span class="n">sum</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">// 3</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Les_templates">Les templates</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=10" title="Modifier la section : Les templates" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=10" title="Modifier le code source de la section : Les templates"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="bandeau-container bandeau-section metadata bandeau-niveau-information"><div class="bandeau-cell bandeau-icone-css loupe">Article détaillé : <a href="/wiki/Template_(programmation)" title="Template (programmation)">Template (programmation)</a>.</div></div> <div class="mw-heading mw-heading4"><h4 id="Les_templates_variadiques_[7],[8]"><span id="Les_templates_variadiques_.5B7.5D.2C.5B8.5D"></span>Les templates variadiques <sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite_crochet">[</span>7<span class="cite_crochet">]</span></a></sup><sup class="reference cite_virgule">,</sup><sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite_crochet">[</span>8<span class="cite_crochet">]</span></a></sup></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=11" title="Modifier la section : Les templates variadiques [7],[8]" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=11" title="Modifier le code source de la section : Les templates variadiques [7],[8]"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Pour remplacer les <a href="/wiki/Fonction_variadique" title="Fonction variadique">fonctions variadiques</a> du C (déconseillées en C++, car contournant toute vérification du type des paramètres), C++11 introduit les <a href="/wiki/Template_variadique" class="mw-redirect" title="Template variadique">templates variadiques</a>. Ces templates étendent le concept précédent en lui ajoutant la possibilité de prendre un nombre quelconque d'arguments. Elles sont supportées par le compilateur <a href="/wiki/GNU_Compiler_Collection" title="GNU Compiler Collection">GCC</a> depuis la version 4.3 car elles font partie de l'expérimentation du support de C++0x<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite_crochet">[</span>9<span class="cite_crochet">]</span></a></sup>. </p><p>Les templates possédant un nombre quelconque d'arguments sont utiles pour implémenter une classe <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">tuple</span></code>, qui généralise le concept de paire (triplet, <a href="/wiki/N-uplet" class="mw-redirect" title="N-uplet">n-uplet</a>, etc.). On illustre les templates variadiques avec cet exemple d'implémentation de la fonction <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">printf</span></code> : </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">printf</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="n">s</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">s</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">s</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'%'</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">*++</span><span class="n">s</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'%'</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">throw</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">runtime_error</span><span class="p">(</span><span class="s">"too few arguments provided to printf"</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">cout</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="o">*</span><span class="n">s</span><span class="o">++</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="p">}</span> <span class="k">template</span><span class="o"><</span><span class="k">typename</span><span class="w"> </span><span class="nc">T</span><span class="p">,</span><span class="w"> </span><span class="k">typename</span><span class="p">...</span><span class="w"> </span><span class="n">Args</span><span class="o">></span> <span class="kt">void</span><span class="w"> </span><span class="n">printf</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="o">*</span><span class="w"> </span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">T</span><span class="o">&</span><span class="w"> </span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">Args</span><span class="o">&</span><span class="p">...</span><span class="w"> </span><span class="n">args</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">s</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">s</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'%'</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">*++</span><span class="n">s</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'%'</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">cout</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="n">value</span><span class="p">;</span> <span class="w"> </span><span class="n">printf</span><span class="p">(</span><span class="o">++</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="n">args</span><span class="p">...);</span> <span class="w"> </span><span class="k">return</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">cout</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="o">*</span><span class="n">s</span><span class="o">++</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">throw</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">runtime_error</span><span class="p">(</span><span class="s">"extra arguments provided to printf"</span><span class="p">);</span> <span class="p">}</span> </pre></div> <p>C++11 définit un certain nombre de concepts que nous pouvons approcher grâce au code source suivant : </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"><</span><span class="k">class</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="n">T</span><span class="o">></span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">Tuple</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">};</span> <span class="k">template</span><span class="o"><</span><span class="k">class</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="n">T</span><span class="o">></span><span class="w"> </span> <span class="kt">void</span><span class="w"> </span><span class="n">f</span><span class="p">(</span><span class="n">T</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="n">args</span><span class="p">);</span> <span class="k">template</span><span class="o"><</span><span class="k">class</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="n">T</span><span class="o">></span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">g</span><span class="p">(</span><span class="n">T</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="n">a</span><span class="p">);</span><span class="w"> </span> <span class="k">template</span><span class="o"><</span><span class="k">class</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="n">T</span><span class="o">></span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">h</span><span class="p">(</span><span class="n">T</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="n">b</span><span class="p">)</span><span class="w"> </span> <span class="p">{</span><span class="w"> </span> <span class="w"> </span><span class="n">g</span><span class="p">(</span><span class="n">b</span><span class="w"> </span><span class="p">...);</span><span class="w"> </span> <span class="p">}</span> </pre></div> <ul><li>À la première déclaration, l'argument template <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">class</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="n">T</span></code> est appelé un <b>pack de paramètres template</b> car il regroupe un nombre fini d'arguments (déterminé à la compilation).</li> <li>À la seconde déclaration, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">T</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="n">args</span></code> s'appelle un <b>pack de paramètres de fonction</b>. C'est un paramètre de fonction qui englobe un paramètre pour chaque argument contenu par le pack de paramètres template <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">class</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="n">T</span></code>.</li> <li>Enfin, la troisième déclaration nous apprend comment utiliser un <b>pack étendu</b> de paramètres. Le mot <i>extension</i> est utilisé car lors de l'appel à <i>g</i>, le pack de paramètres sera étendu avant d'être passé à <i>g</i>.</li></ul> <div class="mw-heading mw-heading4"><h4 id="Les_concepts">Les concepts</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=12" title="Modifier la section : Les concepts" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=12" title="Modifier le code source de la section : Les concepts"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Les <a href="/w/index.php?title=Concept_(C%2B%2B)&action=edit&redlink=1" class="new" title="Concept (C++) (page inexistante)">concepts</a> <a href="https://en.wikipedia.org/wiki/concepts_(C%2B%2B)" class="extiw" title="en:concepts (C++)"><span class="indicateur-langue" title="Article en anglais : « concepts (C++) »">(en)</span></a>, initialement prévus pour cette version du C++, ont été repoussés à la norme C++20. </p> <div class="mw-heading mw-heading4"><h4 id="Les_chevrons_(<>)_[10]"><span id="Les_chevrons_.28.3C.3E.29_.5B10.5D"></span>Les chevrons (<code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="o"><></span></code>) <sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite_crochet">[</span>10<span class="cite_crochet">]</span></a></sup></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=13" title="Modifier la section : Les chevrons (<>) [10]" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=13" title="Modifier le code source de la section : Les chevrons (<>) [10]"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div><p> Les compilateurs C++03 traitent toujours une séquence de deux signes <i>supérieur à</i> comme un opérateur de <a href="/w/index.php?title=D%C3%A9calage_binaire&action=edit&redlink=1" class="new" title="Décalage binaire (page inexistante)">décalage binaire</a> vers la droite. En conséquence, lors de l'imbrication de l'utilisation de patrons, les programmeurs sont obligés d'insérer un espace entre les deux <a href="/wiki/Chevron_(typographie)" title="Chevron (typographie)">chevrons</a> fermants. Par exemple, en C++03, ce code provoque une erreur de compilation :</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"><vector></span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="kt">int</span><span class="o">>></span><span class="w"> </span><span class="n">matrix</span><span class="p">;</span> <span class="c1">// Attention ! Écrire plutôt : “std::vector<std::vector<int> >”</span> </pre></div> <p>C++11 tente de détecter automatiquement si les symboles doivent jouer le rôle de chevrons fermants ou d'opérateur de décalage binaire. </p> <div class="mw-heading mw-heading4"><h4 id="Template_externe_[11]"><span id="Template_externe_.5B11.5D"></span>Template externe <sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite_crochet">[</span>11<span class="cite_crochet">]</span></a></sup></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=14" title="Modifier la section : Template externe [11]" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=14" title="Modifier le code source de la section : Template externe [11]"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Les templates ne sont actuellement pas pris en compte par l'éditeur de liens : il est nécessaire d'incorporer leur définition dans tous les fichiers sources les utilisant en <a href="/wiki/Programmation_modulaire" title="Programmation modulaire">programmation modulaire</a>. Leur compilation était donc longue et gourmande puisque la classe était recompilée dans chaque fichier source, pour chaque type utilisé. </p><p>C++11 permet l'utilisation du mot-clé <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">extern</span></code> pour rendre les templates globaux. Les fichiers désirant utiliser le template n'ont qu'à le déclarer. </p> <div class="mw-heading mw-heading3"><h3 id="Autres_nouvelles_fonctionnalités_du_C++11"><span id="Autres_nouvelles_fonctionnalit.C3.A9s_du_C.2B.2B11"></span>Autres nouvelles fonctionnalités du C++11</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=15" title="Modifier la section : Autres nouvelles fonctionnalités du C++11" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=15" title="Modifier le code source de la section : Autres nouvelles fonctionnalités du C++11"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading4"><h4 id="Assertions_statiques_[12]"><span id="Assertions_statiques_.5B12.5D"></span>Assertions statiques <sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite_crochet">[</span>12<span class="cite_crochet">]</span></a></sup></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=16" title="Modifier la section : Assertions statiques [12]" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=16" title="Modifier le code source de la section : Assertions statiques [12]"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>La bibliothèque <a href="/wiki/Boost_(biblioth%C3%A8ques)" title="Boost (bibliothèques)">Boost</a> propose déjà cette facilité à travers la macro <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">BOOST_STATIC_ASSERT</span></code>. Cependant, son implémentation est étrange, basée sur la <a href="/wiki/M%C3%A9taprogrammation" title="Métaprogrammation">métaprogrammation</a> et des comparaisons de taille de structures intermédiaires créées pour l'assertion sans trop de rapport avec le concept. Par conséquent, intégrer la fonction dans le langage apporte une solution propre au problème. </p><p>En pratique, une assertion statique permet de vérifier à la compilation qu'une valeur est vraie. Par exemple, il est possible d'implémenter les concepts en utilisant <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">boost</span><span class="o">::</span><span class="n">traits</span></code> et <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">BOOST_STATIC_ASSERT</span></code>. Si une classe template nécessite que son type template soit un <a href="/wiki/Passive_data_structure" title="Passive data structure">POD (Plain Old Data)</a>, elle peut faire une assertion statique sur <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">boost</span><span class="o">::</span><span class="n">is_pod</span><span class="o"><</span><span class="n">T</span><span class="o">>::</span><span class="n">type</span><span class="o">::</span><span class="n">value</span></code>, ce qui est une constante intégrale de type <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">unspecified</span><span class="o">-</span><span class="kt">bool</span><span class="o">-</span><span class="n">type</span></code> et remplit dont le critère pour paraître dans une assertion statique. </p><p>En outre, en C++11, l'expression : </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="k">sizeof</span><span class="p">(</span><span class="kt">long</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </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="s">"La bibliothèque doit être compilée sous un système 64-BIT"</span><span class="p">);</span> </pre></div> <p>permet à une bibliothèque d'être certaine qu'elle est compilée sur un système où le type <code>long</code> utilise strictement plus d'octets que le type <code>int</code> (<a href="/wiki/X86-64" class="mw-redirect" title="X86-64">x86-64</a> par exemple). </p> <div class="mw-heading mw-heading4"><h4 id="Inférence_de_types_[13]"><span id="Inf.C3.A9rence_de_types_.5B13.5D"></span><a href="/wiki/Inf%C3%A9rence_de_types" title="Inférence de types">Inférence de types</a> <sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite_crochet">[</span>13<span class="cite_crochet">]</span></a></sup></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=17" title="Modifier la section : Inférence de types [13]" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=17" title="Modifier le code source de la section : Inférence de types [13]"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Le mot clé <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">auto</span></code> possède une nouvelle sémantique en C++11. Dans les versions précédentes, déclarer une variable automatique indiquait au compilateur qu'elle était valide seulement dans l'espace où elle était déclarée ; comme ce comportement étant aussi celui par défaut, ce mot clé était superflu. En C++11, il change de sémantique et prend la place du type dans la déclaration. Le type sera alors automatiquement décidé par correspondance avec le type retourné par l'objet utilisé pour l'initialisation de la variable. Les variables étant déclarées avec <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">auto</span></code> devront donc impérativement être initialisées. Exemple : </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">f</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">boost</span><span class="o">::</span><span class="n">bind</span><span class="p">(</span><span class="n">MyFunc</span><span class="p">,</span><span class="w"> </span><span class="n">_1</span><span class="p">);</span> <span class="n">f</span><span class="p">(</span><span class="mi">5</span><span class="p">);</span> </pre></div> <p>Le type de <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">f</span></code> est un type interne de la bibliothèque surchargé environ quatre-vingts fois avec un script <a href="/wiki/Perl_(langage)" title="Perl (langage)">Perl</a><sup class="need_ref_tag" style="padding-left:2px;"><a href="/wiki/Wikip%C3%A9dia:Style_encyclop%C3%A9dique#Clair" title="Wikipédia:Style encyclopédique">[pas clair]</a></sup>. Il était difficile d'écrire explicitement le type pour stocker le résultat d'un <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">bind</span></code> dans un objet n'était pas pratique du tout avant le nouveau rôle du mot clé <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">auto</span></code>, d'où son apparition. D'une manière générale, l'utilisation du mot clé <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">auto</span></code> permet de passer moins de temps à écrire ce que le compilateur sait déjà. </p><p>Le nouveau standard ajoute le mot clé <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">decltype</span></code> qui permet de typer une variable à partir du type d'une autre variable. Par exemple : </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">i</span><span class="p">;</span> <span class="k">decltype</span><span class="p">(</span><span class="n">i</span><span class="p">)</span><span class="w"> </span><span class="n">j</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>Le type de <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">j</span></code> sera du même type que <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">i</span></code>, soit <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">int</span></code>. Cette déclaration automatique du type d'une variable peut être très utile dans les templates. </p> <div class="mw-heading mw-heading4"><h4 id="Expressions_et_fonctions_lambda_[14],[15],[16]"><span id="Expressions_et_fonctions_lambda_.5B14.5D.2C.5B15.5D.2C.5B16.5D"></span>Expressions et fonctions lambda <sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite_crochet">[</span>14<span class="cite_crochet">]</span></a></sup><sup class="reference cite_virgule">,</sup><sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite_crochet">[</span>15<span class="cite_crochet">]</span></a></sup><sup class="reference cite_virgule">,</sup><sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite_crochet">[</span>16<span class="cite_crochet">]</span></a></sup></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=18" title="Modifier la section : Expressions et fonctions lambda [14],[15],[16]" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=18" title="Modifier le code source de la section : Expressions et fonctions lambda [14],[15],[16]"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Une fonction lambda construit une <a href="/wiki/Fermeture_(informatique)" title="Fermeture (informatique)">fermeture</a> ; c.-à-d. un objet fonction anonyme capable de capturer des variables dans la portée, de prendre des paramètres en entrée et de retourner un résultat. La syntaxe générale et complète est : </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="p">[</span><span class="w"> </span><span class="n">capture</span><span class="w"> </span><span class="p">]</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">params</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="k">mutable</span><span class="w"> </span><span class="n">exception</span><span class="w"> </span><span class="n">attribute</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">body</span><span class="w"> </span><span class="p">}</span> </pre></div> <p>. En particulier : </p> <ul><li>si aucune variable n'est à capturer, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="p">[</span><span class="w"> </span><span class="n">capture</span><span class="w"> </span><span class="p">]</span></code> devient <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="p">[]</span></code>;</li> <li>si aucun paramètre n'est à passer, on écrira <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="p">(</span><span class="w"> </span><span class="n">params</span><span class="w"> </span><span class="p">)</span></code>devient<code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="p">()</span></code>;</li> <li>les parties <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">mutable</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">exception</span></code> et <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">attribute</span></code> sont optionnelles ;</li> <li>si aucun retour n'est effectué ou si le compilateur peut déterminer le type de retour, on omet la partie <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="o">-></span><span class="w"> </span><span class="n">ret</span></code>.</li></ul> <p>Voici un exemple qui réalise l'extraction d'un nom de fichier à partir du chemin entier, à l'instar de la commande <a href="/wiki/Basename" title="Basename"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">basename</span></code></a> : </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">basename</span><span class="p">([]</span><span class="w"> </span><span class="p">(</span><span class="k">const</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="o">&</span><span class="n">str</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// Spécification du retour explicite '-> const char *' inutile</span> <span class="w"> </span><span class="kt">size_t</span><span class="w"> </span><span class="n">pos</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">str</span><span class="p">.</span><span class="n">find_last_of</span><span class="p">(</span><span class="s">"/</span><span class="se">\\</span><span class="s">"</span><span class="p">);</span><span class="w"> </span><span class="c1">// Séparateurs pour Linux et Windows</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">start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">str</span><span class="p">.</span><span class="n">c_str</span><span class="p">();</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">pos</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">string</span><span class="o">::</span><span class="n">npos</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">start</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">pos</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">start</span><span class="p">;</span> <span class="p">});</span> <span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="s">"["</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="s">"] -> ["</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="n">basename</span><span class="p">(</span><span class="n">str</span><span class="p">)</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="s">"]</span><span class="se">\n</span><span class="s">"</span><span class="p">;</span><span class="w"> </span><span class="c1">// Utilisation</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Sémantique_des_RValues_Reference/Move"><span id="S.C3.A9mantique_des_RValues_Reference.2FMove"></span>Sémantique des RValues Reference/Move</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=19" title="Modifier la section : Sémantique des RValues Reference/Move" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=19" title="Modifier le code source de la section : Sémantique des RValues Reference/Move"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>L'introduction de la sémantique <i>move</i> (déplacement) prend son sens en constatant qu'en C++, il n'y a aucune manière générique de déplacer un objet sans le copier. Par exemple lorsqu'une fonction renvoie un objet de grosse taille, celui-ci est copié dans une zone temporaire avant d'être à nouveau copié là où le résultat de la fonction est affecté. Après chaque étape de copie l'objet copié devient inutile et est détruit. Il serait beaucoup plus efficace de déplacer l'objet plutôt que de le recopier et détruire l'original. C'est particulièrement vrai si l'objet est d'un type proche du type <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">T</span></code> ci-dessous, où <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">LargeDataT</span></code> est un type d'objet coûteux à dupliquer : </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">T</span> <span class="p">{</span> <span class="w"> </span><span class="n">LargeDataT</span><span class="w"> </span><span class="o">*</span><span class="n">ptr</span><span class="p">;</span> <span class="k">public</span><span class="o">:</span> <span class="w"> </span><span class="n">T</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">T</span><span class="w"> </span><span class="o">&</span><span class="n">x</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">ptr</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">LargeDataT</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">x</span><span class="p">.</span><span class="n">ptr</span><span class="p">)</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">{}</span> <span class="w"> </span><span class="o">~</span><span class="n">T</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">delete</span><span class="w"> </span><span class="n">ptr</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">MoveFrom</span><span class="w"> </span><span class="p">(</span><span class="n">T</span><span class="o">&</span><span class="w"> </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">ptr</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">ptr</span><span class="p">;</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="n">ptr</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="p">}</span> <span class="p">};</span> </pre></div> <p>En effet le déplacement d'un objet de ce type <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">T</span></code> requiert simplement la recopie du membre <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">ptr</span></code> alors que sa duplication alloue et copie un nouvel objet <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">LargeDataT</span></code>. Le problème que résout C++11 par l'ajout des RValues reference est de pouvoir appeler la fonction <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">MoveFrom</span></code> en lieu et place du constructeur de recopie dans les cas où la copie correspond à un déplacement. Ceci s'obtient par l'ajout du constructeur de déplacement ci-dessous : </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="n">T</span><span class="p">(</span><span class="n">T</span><span class="w"> </span><span class="o">&&</span><span class="n">x</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">ptr</span><span class="w"> </span><span class="p">(</span><span class="n">x</span><span class="p">.</span><span class="n">ptr</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="n">ptr</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="p">}</span> </pre></div> <p>Le double & marque la référence sur <i>rvalue</i> (parfois aussi appelée <i>temporaire</i>). C'est-à-dire une référence sur quelque chose qui est temporaire ou est sur le point d'être détruit. Le constructeur de déplacement sera donc choisi par le compilateur à la place du constructeur de recopie en cas de copie d'un objet temporaire ou sur le point d'être supprimé. Sur tous les autres aspects une référence sur une rvalue est identique à une référence classique maintenant appelée référence sur <i>lvalue</i> (que l'on peut définir grossièrement par : tout ce qui a une adresse). </p><p>De cette définition ressort un fait qui peut sembler paradoxal : une variable de type référence sur une rvalue n'est généralement pas une référence sur une rvalue ! En effet à partir du moment où une référence sur une rvalue est écrite dans une variable, y compris si elle est de type référence sur rvalue, elle perd son caractère temporaire dans l'espace de définition de cette variable. </p><p>Mais parfois il est utile d'appeler le constructeur de déplacement même à partir d'une variable qui n'est pas temporaire. Par exemple la commande <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">swap</span></code> est souvent introduite par le patron de fonction ci-dessous : </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"><</span><span class="k">class</span><span class="w"> </span><span class="nc">T</span><span class="o">></span> <span class="kt">void</span><span class="w"> </span><span class="n">swap</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">T</span><span class="o">&</span><span class="w"> </span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">T</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="n">a</span><span class="p">);</span><span class="w"> </span> <span class="w"> </span><span class="n">a</span><span class="o">=</span><span class="n">b</span><span class="p">;</span><span class="w"> </span> <span class="w"> </span><span class="n">b</span><span class="o">=</span><span class="n">c</span><span class="p">;</span> <span class="p">}</span> </pre></div> <p>Cette fonction a pour inconvénient d'appeler d'abord le constructeur de recopie, puis deux opérateurs d'assignation. Ce sont donc 3 copies au total, qui sont des opérations coûteuses si les objets impliqués sont de taille importante. Ici le constructeur de déplacement n'est pas appelé car a, b et c comme source de la copie ne sont pas temporaires. C++11 introduit la fonction <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">()</span></code> qui renvoie une référence à une rvalue et prend pour paramètre une référence à une lvalue ou à une rvalue. Son patron est le suivant : </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"><</span><span class="k">class</span><span class="w"> </span><span class="nc">T</span><span class="o">></span> <span class="k">typename</span><span class="w"> </span><span class="nc">remove_reference</span><span class="o"><</span><span class="n">T</span><span class="o">>::</span><span class="n">type</span><span class="o">&&</span> <span class="n">move</span><span class="p">(</span><span class="n">T</span><span class="o">&&</span><span class="w"> </span><span class="n">a</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">a</span><span class="p">;</span> <span class="p">}</span> </pre></div> <p>La fonction <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">move</span><span class="p">()</span></code> donne à ce qu'il retourne la valeur de son paramètre. La fonction move ne modifie pas l'objet qui lui est passé mais reçoit et fournit une référence sur un objet non constant. L'objet d'origine peut donc être modifié à partir du résultat de la fonction <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">move</span><span class="p">()</span></code>. Le point important de <i>move</i> est qu'il n'y a aucune copie de faite. En utilisant <i>move</i>, on peut ainsi réécrire de façon concise <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">swap</span><span class="p">()</span></code>, sans qu'il n'y ait de copie. </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"><</span><span class="k">class</span><span class="w"> </span><span class="nc">T</span><span class="o">></span><span class="w"> </span> <span class="kt">void</span><span class="w"> </span><span class="n">swap</span><span class="p">(</span><span class="n">T</span><span class="o">&</span><span class="w"> </span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&</span><span class="w"> </span><span class="n">b</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="n">T</span><span class="w"> </span><span class="nf">tmp</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">a</span><span class="p">));</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">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">b</span><span class="p">);</span><span class="w"> </span> <span class="w"> </span><span class="n">b</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">move</span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> <span class="p">}</span> </pre></div> <p>Un autre intérêt de <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">move</span><span class="p">()</span></code> est de permettre d'obtenir une copie d'un objet volumineux sans qu'il y ait de copie réelle de celui-ci, en particulier de la partie volumineuse. De plus, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">move</span><span class="p">()</span></code> est impératif<sup class="need_ref_tag" style="padding-left:2px;"><a href="/wiki/Aide:Pr%C3%A9ciser_un_fait" title="Aide:Préciser un fait">[Quoi ?]</a></sup> dans le cas d'un objet non copiable comme le <a href="/wiki/Pointeur_intelligent" title="Pointeur intelligent">“smart pointer”</a> <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">unique_ptr</span></code>. </p> <div class="mw-heading mw-heading4"><h4 id="Énumérations_fortement_typées_[17]"><span id=".C3.89num.C3.A9rations_fortement_typ.C3.A9es_.5B17.5D"></span>Énumérations fortement typées <sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite_crochet">[</span>17<span class="cite_crochet">]</span></a></sup></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=20" title="Modifier la section : Énumérations fortement typées [17]" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=20" title="Modifier le code source de la section : Énumérations fortement typées [17]"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>L'énumération du langage C est similaire à une liste de définitions de symboles (<a href="/wiki/Macro-d%C3%A9finition" title="Macro-définition">macros</a>) correspondant à des nombres entiers, et les versions de C++ antérieures à C++11 n'avaient répondu qu'en interdisant la conversion d'un type énumération dans un autre. </p><p>C++11 proposera des énumérations « fortement typées ». Ces énumérations seront obtenues en remplaçant <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">enum</span></code> par <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">enum</span><span class="w"> </span><span class="k">class</span></code> ou <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">enum</span><span class="w"> </span><span class="k">struct</span></code>. La conversion implicite d'éléments de ces énumérations vers les entiers sera prohibée et l'accès aux éléments se fera à l'aide de l'opérateur de résolution de portée. Voici un exemple d'utilisation : </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">Chiffres</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">Zero</span><span class="p">,</span><span class="w"> </span><span class="n">Un</span><span class="p">,</span><span class="w"> </span><span class="n">Deux</span><span class="p">,</span><span class="w"> </span><span class="n">Trois</span><span class="p">,</span><span class="w"> </span><span class="n">Quatre</span><span class="p">,</span><span class="w"> </span><span class="n">Cinq</span><span class="p">,</span><span class="w"> </span><span class="n">Six</span><span class="p">,</span><span class="w"> </span><span class="n">Sept</span><span class="p">,</span><span class="w"> </span><span class="n">Huit</span><span class="p">,</span><span class="w"> </span><span class="n">Neuf</span><span class="w"> </span><span class="p">};</span> <span class="n">Chiffres</span><span class="w"> </span><span class="n">chif</span><span class="p">;</span> <span class="n">chif</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Chiffres</span><span class="o">::</span><span class="n">Sept</span><span class="p">;</span> <span class="kt">int</span><span class="w"> </span><span class="n">nb</span><span class="p">;</span> <span class="n">nb</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="n">Chiffres</span><span class="o">::</span><span class="n">Trois</span><span class="p">;</span> </pre></div> <p>L'opérateur de résolution de portée est optionnel avec des énumérations faiblement typées : </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">Enum2</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">E_1</span><span class="p">,</span><span class="w"> </span><span class="n">E_2</span><span class="w"> </span><span class="p">};</span> <span class="n">Enum2</span><span class="w"> </span><span class="n">e1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">E_1</span><span class="p">;</span><span class="w"> </span><span class="c1">// Comme en C++03</span> <span class="n">Enum2</span><span class="w"> </span><span class="n">e2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Enum2</span><span class="o">::</span><span class="n">E_2</span><span class="p">;</span><span class="w"> </span><span class="c1">// Comme avec une enum class;</span> </pre></div> <p>De plus, C++11 vous permettra de choisir le type d'entier sous-jacent des énumérations (tous sauf <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">wchar_t</span></code>): </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="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="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">Valeur1</span><span class="p">,</span><span class="w"> </span><span class="n">Valeur2</span><span class="w"> </span><span class="p">};</span> </pre></div> <p>Par défaut, ce type sera <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">int</span></code>. Ce comportement sera aussi possible avec les énumérations normalement typées, et il sera bien sûr toujours possible de définir la valeur d'une partie de l'énumération : </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">EnumerationNormale</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">UINT8</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">ValeurDepart</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">ValeurMoyenne</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">127</span><span class="p">,</span><span class="w"> </span><span class="n">ValeurMaximum</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">255</span><span class="w"> </span><span class="p">};</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Boucles_basées_sur_des_intervalles_[18]"><span id="Boucles_bas.C3.A9es_sur_des_intervalles_.5B18.5D"></span>Boucles basées sur des intervalles <sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite_crochet">[</span>18<span class="cite_crochet">]</span></a></sup></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=21" title="Modifier la section : Boucles basées sur des intervalles [18]" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=21" title="Modifier le code source de la section : Boucles basées sur des intervalles [18]"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Le code nécessaire en C++ pour le parcours d'un intervalle et l'action sur ses éléments était lourde et longue. De nombreux langages, comme <a href="/wiki/Langage_Java" class="mw-redirect" title="Langage Java">Java</a>, ont fourni à leurs utilisateurs un opérateur <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">foreach</span></code> qui permet de parcourir une liste avec aisance<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite_crochet">[</span>note 1<span class="cite_crochet">]</span></a></sup>. Pour répondre aux attentes, la norme C++11 fournit la syntaxe de l'instruction <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">for</span></code> qui s'implémentera de cette façon : </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">mon_tableau</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="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="o">&</span><span class="n">x</span><span class="o">:</span><span class="w"> </span><span class="n">mon_tableau</span><span class="p">)</span><span class="w"> </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="p">}</span> </pre></div><p> Le code précédent double chaque élément du tableau <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">mon_tableau</span></code>. L'entier <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">x</span></code> défini pour le corps de la boucle <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">for</span></code> référence successivement chacun des éléments du tableau. Ce type de parcours fonctionnera pour les listes classiques, les listes d'initialiseurs, ainsi que les conteneurs de la STL définissant les fonctions membres <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">begin</span></code> et <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">end</span></code> comme dans l'exemple suivant :</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"><</span><span class="kt">int</span><span class="o">></span><span class="w"> </span><span class="n">myvector</span><span class="p">;</span> <span class="n">myvector</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="mi">100</span><span class="p">);</span> <span class="n">myvector</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="mi">200</span><span class="p">);</span> <span class="n">myvector</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="mi">300</span><span class="p">);</span> <span class="c1">// Show content</span> <span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="s">"</span><span class="se">\n</span><span class="s">Show content of "</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="n">myvector</span><span class="p">.</span><span class="n">size</span><span class="p">()</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="s">" elements</span><span class="se">\n</span><span class="s">"</span><span class="p">;</span> <span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="s">"Version with iterator</span><span class="se">\n</span><span class="s">"</span><span class="p">;</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"><</span><span class="kt">int</span><span class="o">>::</span><span class="n">iterator</span><span class="w"> </span><span class="n">it</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">myvector</span><span class="p">.</span><span class="n">begin</span><span class="p">();</span><span class="w"> </span><span class="n">it</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">myvector</span><span class="p">.</span><span class="n">end</span><span class="p">();</span><span class="w"> </span><span class="o">++</span><span class="n">it</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">cout</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="o">*</span><span class="n">it</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="sc">'\n'</span><span class="p">;</span> <span class="p">}</span> <span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="s">"Version with [] operator</span><span class="se">\n</span><span class="s">"</span><span class="p">;</span> <span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">size_t</span><span class="w"> </span><span class="n">n</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">n</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">myvector</span><span class="p">.</span><span class="n">size</span><span class="p">();</span><span class="w"> </span><span class="o">++</span><span class="n">n</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">cout</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="n">myvector</span><span class="p">[</span><span class="n">n</span><span class="p">]</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="sc">'\n'</span><span class="p">;</span> <span class="p">}</span> <span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="s">"Version 'foreach'</span><span class="se">\n</span><span class="s">"</span><span class="p">;</span> <span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">value</span><span class="o">:</span><span class="w"> </span><span class="n">myvector</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// for (auto value: myvector) est recommandé car aucune ambiguïté </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"><<</span><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="sc">'\n'</span><span class="p">;</span> <span class="p">}</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Littéraux_définis_par_l'utilisateur_[19]"><span id="Litt.C3.A9raux_d.C3.A9finis_par_l.27utilisateur_.5B19.5D"></span>Littéraux définis par l'utilisateur <sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite_crochet">[</span>19<span class="cite_crochet">]</span></a></sup></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=22" title="Modifier la section : Littéraux définis par l'utilisateur [19]" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=22" title="Modifier le code source de la section : Littéraux définis par l'utilisateur [19]"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div><p> Les littéraux définis par l'utilisateur<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite_crochet">[</span>note 2<span class="cite_crochet">]</span></a></sup> permettent d'ajouter de nouveaux suffixes, au même titre que <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">UL</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">ULL</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">L</span></code>... Les suffixes créés ainsi doivent commencer par un <a href="/wiki/Tiret_bas" title="Tiret bas">tiret bas</a> (<code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">_</span></code>) afin de ne pas entrer en conflit avec les futurs littéraux introduits dans la librairie standard. Par exemple :</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">Distance</span> <span class="p">{</span> <span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">d</span><span class="p">;</span><span class="w"> </span><span class="c1">// d in mm</span> <span class="w"> </span><span class="n">Distance</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">mm</span><span class="p">)</span><span class="o">:</span> <span class="w"> </span><span class="n">d</span><span class="p">(</span><span class="n">mm</span><span class="p">);</span> <span class="w"> </span><span class="p">{}</span> <span class="p">}</span> <span class="kr">inline</span><span class="w"> </span><span class="k">constexpr</span><span class="w"> </span><span class="n">Distance</span><span class="w"> </span><span class="k">operator</span><span class="w"> </span><span class="s">""</span><span class="n">_mm</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="w"> </span><span class="n">value</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">Distance</span><span class="p">(</span><span class="n">value</span><span class="p">);</span> <span class="p">}</span> <span class="kr">inline</span><span class="w"> </span><span class="k">constexpr</span><span class="w"> </span><span class="n">Distance</span><span class="w"> </span><span class="k">operator</span><span class="w"> </span><span class="s">""</span><span class="n">_m</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="w"> </span><span class="n">value</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">Distance</span><span class="p">(</span><span class="n">value</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">1000</span><span class="p">);</span> <span class="p">}</span> <span class="kr">inline</span><span class="w"> </span><span class="k">constexpr</span><span class="w"> </span><span class="n">Distance</span><span class="w"> </span><span class="k">operator</span><span class="w"> </span><span class="s">""</span><span class="n">_cm</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="w"> </span><span class="n">value</span><span class="p">)</span> <span class="p">{</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">Distance</span><span class="p">(</span><span class="n">value</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span> <span class="p">}</span> <span class="k">auto</span><span class="w"> </span><span class="n">DistanceChaiseBureau</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">20</span><span class="n">_cm</span><span class="p">;</span><span class="w"> </span><span class="c1">// Instance de Distance, d = 200</span> <span class="k">auto</span><span class="w"> </span><span class="n">DistanceMachineACafe</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">5</span><span class="n">_m</span><span class="p">;</span><span class="w"> </span><span class="c1">// Instance de Distance, d = 5000</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Pointeur_NULL_[20]"><span id="Pointeur_NULL_.5B20.5D"></span>Pointeur <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="nb">NULL</span></code> <sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite_crochet">[</span>20<span class="cite_crochet">]</span></a></sup></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=23" title="Modifier la section : Pointeur NULL [20]" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=23" title="Modifier le code source de la section : Pointeur NULL [20]"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Le nouveau mot-clé <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">nullptr</span></code> est une constante du langage avec le caractère particulier d'être assignable à tous les types de pointeurs. En effet, contrairement au C où la macro préprocesseur est généralement définie avec <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="cp">#define NULL ((void*)0)</span></code>, en C++ il est interdit d'assigner un <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">void</span><span class="o">*</span></code> à un pointeur d'un type différent. L'usage était donc de définir <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="nb">NULL</span></code> avec l'entier <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="mi">0</span></code>. Ce comportement restera compatible, mais il sera aussi possible d'écrire : </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="n">T</span><span class="o">*</span><span class="w"> </span><span class="n">ptr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">nullptr</span><span class="p">;</span> </pre></div> <p>La constante <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="nb">NULL</span></code> définie comme l'entier <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="mi">0</span></code> ne permettait pas au compilateur de déterminer quelle surcharge de <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">f</span></code> choisir dans le code suivant : </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">f</span><span class="p">(</span><span class="kt">int</span><span class="p">);</span> <span class="kt">void</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span><span class="kt">void</span><span class="o">*</span><span class="p">);</span> <span class="n">f</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span><span class="w"> </span><span class="c1">// Entier 0 ou pointeur nul?</span> </pre></div> <p>Le mot clé <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="k">nullptr</span></code> est une constante du type <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">nullptr_t</span></code>, non convertible en entier. Pour appeler la fonction <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">f</span></code> avec un pointeur <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="nb">NULL</span></code>, la surcharge est correctement choisie en C++11 dans le code suivant : </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">f</span><span class="p">(</span><span class="kt">int</span><span class="p">);</span> <span class="kt">void</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span><span class="kt">void</span><span class="o">*</span><span class="p">);</span> <span class="n">f</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span><span class="w"> </span><span class="c1">// Entier 0, pas d'ambiguïté</span> <span class="n">f</span><span class="p">(</span><span class="k">nullptr</span><span class="p">);</span><span class="w"> </span><span class="c1">// Convertible en void*, mais pas en int.</span> </pre></div> <div class="mw-heading mw-heading2"><h2 id="Extension_de_la_bibliothèque_standard"><span id="Extension_de_la_biblioth.C3.A8que_standard"></span>Extension de la bibliothèque standard</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=24" title="Modifier la section : Extension de la bibliothèque standard" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=24" title="Modifier le code source de la section : Extension de la bibliothèque standard"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Threads">Threads</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=25" title="Modifier la section : Threads" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=25" title="Modifier le code source de la section : Threads"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>En C++11, la bibliothèque standard implemente le modèle de classe <b><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">std</span><span class="o">::</span><span class="kr">thread</span></code></b>, en s'inspirant de l'implémentation des threads de la bibliothèque <a href="/wiki/Boost_(biblioth%C3%A8ques)" title="Boost (bibliothèques)">Boost</a>. Voici, un exemple illustrant son utilisation : </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"><thread></span> <span class="kt">void</span><span class="w"> </span><span class="nf">tacheGeniale</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">msg</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">cout</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="s">"tâche géniale dit : "</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="n">msg</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="w"> </span><span class="p">()</span> <span class="p">{</span> <span class="w"> </span><span class="cm">/* Création et lancement du thread t qui exécute la fonction tacheGeniale</span> <span class="cm"> avec "bonjour" comme paramètre */</span> <span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="kr">thread</span><span class="w"> </span><span class="n">t</span><span class="p">(</span><span class="n">tacheGeniale</span><span class="p">,</span><span class="w"> </span><span class="s">"bonjour"</span><span class="p">);</span><span class="w"> </span> <span class="w"> </span><span class="n">t</span><span class="p">.</span><span class="n">join</span><span class="p">();</span><span class="w"> </span><span class="c1">// Attend la fin du thread t</span> <span class="p">}</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Type_tuple">Type tuple</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=26" title="Modifier la section : Type tuple" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=26" title="Modifier le code source de la section : Type tuple"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Un tuple est une collection de dimension fixe d'objets de types potentiellement différents. Tout type d'objet peut être élément d'un tuple. Cette nouvelle fonctionnalité est implémentée dans un nouvel <a href="/wiki/En-t%C3%AAte_(informatique)" class="mw-redirect" title="En-tête (informatique)">en-tête</a> et bénéficie des extensions de C++11 comme : </p> <ul><li><a href="/wiki/Template_variadique" class="mw-redirect" title="Template variadique">Les templates variadiques</a></li> <li>Référence sur référence</li> <li>Arguments par défaut pour les fonctions template</li></ul> <p>Le patron de classe <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">tuple</span></code> est déclaré par la ligne : </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"><</span><span class="k">class</span><span class="p">...</span><span class="w"> </span><span class="n">Types</span><span class="o">></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>Un exemple de définition et d'utilisation du type <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">tuple</span></code> : </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">tuple</span><span class="o"><</span><span class="w"> </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">&</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">></span><span class="w"> </span><span class="n">test_tuple</span><span class="w"> </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="w"> </span><span class="p">;</span> <span class="n">test_tuple</span><span class="w"> </span><span class="n">proof</span><span class="p">(</span><span class="w"> </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">"Ciao!"</span><span class="w"> </span><span class="p">)</span><span class="w"> </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">get</span><span class="o"><</span><span class="mi">0</span><span class="o">></span><span class="p">(</span><span class="n">proof</span><span class="p">)</span><span class="w"> </span><span class="p">;</span><span class="w"> </span><span class="c1">// Assigne à ‘lengthy’ la valeur 18</span> <span class="n">get</span><span class="o"><</span><span class="mi">3</span><span class="o">></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">" Beautiful!"</span><span class="w"> </span><span class="p">;</span><span class="w"> </span><span class="c1">// Modifie la {{4e}} valeur du tuple</span> </pre></div> <p>Il est possible de créer le tuple <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">proof</span></code> sans définir son contenu si les éléments du tuple possèdent un constructeur par défaut. De plus, il est possible d'assigner un tuple à un autre tuple : si les deux tuples sont de même type, il est nécessaire que chaque élément du tuple ait un constructeur par copie, sinon il faut que le type de chaque élément de l'opérande de droite soit compatible avec le type correspondant dans l'opérande de gauche ou que l'élément correspondant de l'opérande gauche ait un constructeur approprié. </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">tuple</span><span class="o"><</span><span class="w"> </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">></span><span class="w"> </span><span class="n">tuple_1</span><span class="w"> </span><span class="n">t1</span><span class="w"> </span><span class="p">;</span> <span class="k">typedef</span><span class="w"> </span><span class="n">tuple</span><span class="o"><</span><span class="w"> </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">></span><span class="w"> </span><span class="n">tuple_2</span><span class="w"> </span><span class="n">t2</span><span class="p">(</span><span class="w"> </span><span class="sc">'X'</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">"Hola!"</span><span class="w"> </span><span class="p">)</span><span class="w"> </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="w"> </span><span class="p">;</span><span class="w"> </span><span class="c1">// OK : les deux premiers éléments peuvent être convertis,</span> <span class="w"> </span><span class="c1">// le troisième peut être construit à partir du ‘const char *’.</span> </pre></div> <p>Les opérateurs relationnels sont disponibles (pour les tuples ayant le même nombre d'éléments). Deux expressions sont introduites pour vérifier les caractéristiques d'un tuple (à la compilation) : </p> <ul><li><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">tuple_size</span><span class="o"><</span><span class="n">T</span><span class="o">>::</span><span class="n">value</span><span class="o"><</span></code> retourne le nombre d'éléments du tuple <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">T</span></code>,</li> <li><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">tuple_element</span><span class="o"><</span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">>::</span><span class="n">type</span></code> retourne le type de l'objet placé en position <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">I</span></code> du tuple <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">T</span></code>.</li></ul> <div class="mw-heading mw-heading3"><h3 id="Table_de_hachage">Table de hachage</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=27" title="Modifier la section : Table de hachage" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=27" title="Modifier le code source de la section : Table de hachage"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Intégrer les <a href="/wiki/Table_de_hachage" title="Table de hachage">tables de hachage</a> (conteneurs associatifs non ordonnés) dans la bibliothèque standard du C++ était une demande récurrente. Cela n'avait pas été réalisé pour la norme écrite en 1995 et approuvée en 1998 à cause des contraintes de temps. Bien que cette solution soit moins efficace que les <a href="/wiki/Arbre_%C3%A9quilibr%C3%A9" title="Arbre équilibré">arbres équilibrés</a> dans le pire des cas (en cas de collisions importantes), elle est cependant la meilleure dans la plupart des applications réelles. </p><p>Les collisions seront uniquement gérées par <a href="/wiki/Table_de_hachage#Chaînage" title="Table de hachage">chaînage</a> linéaire car le comité ne considère pas opportun de standardiser des solutions d'<a href="/wiki/Table_de_hachage#Adressage_ouvert" title="Table de hachage">adressage ouvert</a> qui introduisent un nombre important de problèmes intrinsèques<sup class="need_ref_tag" style="padding-left:2px;"><a href="/wiki/Aide:R%C3%A9f%C3%A9rence_n%C3%A9cessaire" title="Aide:Référence nécessaire"><span title="Ce passage nécessite une référence (demandé le septembre 2024) ; voir l'aide.">[réf. nécessaire]</span></a></sup> (en particulier quand la suppression d'éléments est permise). Pour éviter les conflits de noms avec les bibliothèques non standards qui ont leur propre implémentation des tables de hachage, on utilisera le préfixe <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">unordered</span></code>, au lieu de <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">hash</span></code>. </p><p>Cette nouvelle fonctionnalité intégrera quatre types de tables de hachage, différentes selon qu'elles acceptent ou non des éléments de même clé (clé unique ou clé équivalente) et qu'elles associent chaque clé à la valeur associée. </p> <table class="wikitable"> <tbody><tr> <th>Type de table de hachage</th> <th>Type associé arbitraire</th> <th>Clés équivalentes </th></tr> <tr> <th>unordered_set </th> <td></td> <td> </td></tr> <tr> <th>unordered_multiset </th> <td></td> <td align="center"><span style="font-size:2.5em; line-height: 1.2em;">•</span> </td></tr> <tr> <th>unordered_map </th> <td align="center"><span style="font-size:2.5em; line-height: 1.2em;">•</span></td> <td> </td></tr> <tr> <th>unordered_multimap </th> <td align="center"><span style="font-size:2.5em; line-height: 1.2em;">•</span></td> <td align="center"><span style="font-size:2.5em; line-height: 1.2em;">•</span> </td></tr></tbody></table> <p>Ces nouvelles classes remplissent toutes les demandes des <a href="/wiki/Standard_Template_Library#Diagramme_des_conteneurs" title="Standard Template Library">classes de conteneurs</a> et contiennent toutes les méthodes nécessaires pour accéder aux éléments : <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">insert</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">erase</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">begin</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">end</span></code>. </p><p>Ces classes n'ont pas nécessité les nouvelles extensions de C++11 mais seulement une légère extension du header <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="o"><</span><span class="n">functional</span><span class="o">></span></code> et l'introduction des headers <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="o"><</span><span class="n">unordered_set</span><span class="o">></span></code> et <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="o"><</span><span class="n">unordered_map</span><span class="o">></span></code>. Aucun autre changement aux classes n'est nécessaire et elles ne dépendent d'aucune autre extension de la bibliothèque standard. </p> <div class="mw-heading mw-heading3"><h3 id="Expressions_rationnelles">Expressions rationnelles</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=28" title="Modifier la section : Expressions rationnelles" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=28" title="Modifier le code source de la section : Expressions rationnelles"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>La bibliothèque définie dans le fichier d'en-tête <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="o"><</span><span class="n">regex</span><span class="o">></span></code> est constitué d'un ensemble de nouvelles classes : </p> <ul><li>Les <a href="/wiki/Expression_r%C3%A9guli%C3%A8re" title="Expression régulière">expressions rationnelles</a> sont représentées par une instance de la classe template <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">std</span><span class="o">::</span><span class="n">regex</span></code></li> <li>Les résultats sont représentés par une instance de la classe template <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">std</span><span class="o">::</span><span class="n">match_results</span></code></li></ul> <p>La fonction <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">std</span><span class="o">::</span><span class="n">regex_search</span></code> est utilisée pour une recherche. <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">std</span><span class="o">::</span><span class="n">regex_replace</span></code> est utilisée pour effectuer un "chercher-remplacer", elle renvoie pour cela une nouvelle chaîne.Les algorithmes <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">std</span><span class="o">::</span><span class="n">regex_search</span></code> et <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">std</span><span class="o">::</span><span class="n">regex_replace</span></code> prennent une expression rationnelle et une chaîne et écrivent les occurrences trouvées dans la structure <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">std</span><span class="o">::</span><span class="n">match_results</span></code>. </p><p>Voici un exemple d'utilisation de <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">std</span><span class="o">::</span><span class="n">match_results</span></code> : </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></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">reg_esp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"[ ,.</span><span class="se">\\</span><span class="s">t</span><span class="se">\\</span><span class="s">n;:]"</span><span class="p">;</span><span class="w"> </span><span class="c1">// Une liste de caractères séparateurs</span> <span class="c1">// On pourrait aussi utiliser les chaînes littérales</span> <span class="c1">// const char *reg_esp = R"([ ,.\t\n;:])";</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">reg_esp</span><span class="p">);</span><span class="w"> </span><span class="c1">// 'regex' est une instance de la classe</span> <span class="w"> </span><span class="c1">// 'basic_regex' avec un argument de type 'char'.</span> <span class="n">std</span><span class="o">::</span><span class="n">cmatch</span><span class="w"> </span><span class="n">match</span><span class="p">;</span><span class="w"> </span><span class="c1">// 'cmatch' est une instance de la classe</span> <span class="w"> </span><span class="c1">// 'match_results' avec un argument de type 'const char *'.</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">"Unseen University - Ankh-Morpork"</span><span class="p">;</span> <span class="c1">// Trouve tous les mots de 'target' séparés par les caractères de 'reg_esp'.</span> <span class="k">if</span><span class="p">(</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">regex_search</span><span class="p">(</span><span class="w"> </span><span class="n">target</span><span class="p">,</span><span class="w"> </span><span class="n">match</span><span class="p">,</span><span class="w"> </span><span class="n">rgx</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">)</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">size_t</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">match</span><span class="p">.</span><span class="n">size</span><span class="p">();</span> <span class="w"> </span><span class="k">for</span><span class="p">(</span><span class="w"> </span><span class="kt">size_t</span><span class="w"> </span><span class="n">a</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">a</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">n</span><span class="p">;</span><span class="w"> </span><span class="n">a</span><span class="o">++</span><span class="w"> </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="nf">str</span><span class="p">(</span><span class="w"> </span><span class="n">match</span><span class="p">[</span><span class="n">a</span><span class="p">].</span><span class="n">first</span><span class="p">,</span><span class="w"> </span><span class="n">match</span><span class="p">[</span><span class="n">a</span><span class="p">].</span><span class="n">second</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">cout</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">;</span> <span class="w"> </span><span class="p">}</span> <span class="p">}</span> </pre></div> <p>Notez l'utilisation du double backslash, car le C++ utilise le backslash comme un <a href="/wiki/Caract%C3%A8re_d%27%C3%A9chappement" title="Caractère d'échappement">caractère d'échappement</a>. Les chaînes littérales en C++11 peuvent permettre d'éviter le problème. L'utilisation de la bibliothèque <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="o"><</span><span class="n">regex</span><span class="o">></span></code> ne requiert aucune dépendance explicite. </p> <div class="mw-heading mw-heading3"><h3 id="Amélioration_des_nombres_aléatoires_extensibles"><span id="Am.C3.A9lioration_des_nombres_al.C3.A9atoires_extensibles"></span>Amélioration des nombres aléatoires extensibles</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=29" title="Modifier la section : Amélioration des nombres aléatoires extensibles" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=29" title="Modifier le code source de la section : Amélioration des nombres aléatoires extensibles"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>La <a href="/wiki/Biblioth%C3%A8que_standard_du_C" title="Bibliothèque standard du C">bibliothèque standard du C</a> permet de générer des nombres pseudo-aléatoires grâce à la fonction <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">rand</span></code>. L'algorithme de génération n'est pas standardisé mais laissé au choix du fournisseur de la bibliothèque. Le C++ n'y a rien changé, mais C++11 va fournir une manière différente de générer les nombres pseudo-aléatoires. Cette fonctionnalité est découpée en deux parties qui forment un objet de génération de nombres aléatoires : </p> <ul><li>un moteur de génération, qui contient l'état du générateur et produit les nombres pseudo-aléatoires ;</li> <li>une distribution, qui détermine les valeurs que le résultat peut prendre ainsi que sa <a href="/wiki/Loi_de_probabilit%C3%A9" title="Loi de probabilité">loi de probabilité</a>.</li></ul> <p>C++11 définit trois algorithmes de génération, chacun ayant des avantages et des inconvénients. </p> <table class="wikitable"> <tbody><tr> <th>Template</th> <th>Entier/flottant</th> <th>Qualité</th> <th>Vitesse</th> <th>Taille d'état </th></tr> <tr> <th><a href="/wiki/G%C3%A9n%C3%A9rateur_congruentiel_lin%C3%A9aire" title="Générateur congruentiel linéaire"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">linear_congruential</span></code></a> </th> <td align="center">Entier</td> <td align="center">Moyenne</td> <td align="center">Moyenne</td> <td align="center">1 </td></tr> <tr> <th><a href="/w/index.php?title=Subtract_with_carry&action=edit&redlink=1" class="new" title="Subtract with carry (page inexistante)"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">subtract</span><span class="w"> </span><span class="n">with</span><span class="w"> </span><span class="n">carry</span></code></a> </th> <td align="center">Les deux</td> <td align="center">Moyenne</td> <td align="center">Rapide</td> <td align="center">25 </td></tr> <tr> <th><a href="/wiki/Mersenne_Twister" title="Mersenne Twister"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">mersenne_twister</span></code></a> </th> <td align="center">Entier</td> <td align="center">Bonne</td> <td align="center">Rapide</td> <td align="center">624 </td></tr></tbody></table> <p>C++11 fournira un certain nombre de lois standard : <a href="/wiki/Loi_uniforme_discr%C3%A8te" title="Loi uniforme discrète"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">uniform_int_distribution</span></code></a>, <a href="/wiki/Loi_de_Bernoulli" title="Loi de Bernoulli"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">bernoulli_distribution</span></code></a>, <a href="/wiki/Loi_g%C3%A9om%C3%A9trique" title="Loi géométrique"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">geometric_distribution</span></code></a>, <a href="/wiki/Loi_de_Poisson" title="Loi de Poisson"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">poisson_distribution</span></code></a>, <a href="/wiki/Loi_binomiale" title="Loi binomiale"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">binomial_distribution</span></code></a>, <a href="/wiki/Loi_uniforme_continue" title="Loi uniforme continue"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">uniform_real_distribution</span></code></a>, <a href="/wiki/Loi_exponentielle" title="Loi exponentielle"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">exponential_distribution</span></code></a>, <a href="/wiki/Loi_normale" title="Loi normale"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">normal_distribution</span></code></a> et <a href="/wiki/Loi_gamma" class="mw-redirect" title="Loi gamma"><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">gamma_distribution</span></code></a>. </p><p>Le générateur et la distribution se combinent comme dans l'exemple suivant : </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">uniform_int_distribution</span><span class="o"><</span><span class="kt">int</span><span class="o">></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="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> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Fonctions_mathématiques_spéciales"><span id="Fonctions_math.C3.A9matiques_sp.C3.A9ciales"></span>Fonctions mathématiques spéciales</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=30" title="Modifier la section : Fonctions mathématiques spéciales" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=30" title="Modifier le code source de la section : Fonctions mathématiques spéciales"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Le fichier header <code><math></code> définissait déjà plusieurs fonctions mathématiques usuelles : </p> <ul><li><b>trigonométriques</b> : <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">sin</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">cos</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">tan</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">asin</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">acos</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">atan</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">atan2</span></code>;</li> <li><b>hyperboliques</b> : <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">sinh</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">cosh</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">tanh</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">asinh</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">acosh</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">atanh</span></code>;</li> <li><b>exponentielles</b> : <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">exp</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">exp2</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">frexp</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">ldexp</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">expm1</span></code>;</li> <li><b>logarithmiques</b> : <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">log10</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">log2</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">logb</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">ilogb</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">log1p</span></code>;</li> <li><b>puissances</b> : <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">pow</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">sqrt</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">cbrt</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">hypot</span></code>;</li> <li><b>spéciales</b> : <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">erf</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">erfc</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">tgamma</span></code>, <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">lgamma</span></code>.</li></ul> <p>Pour C++11, le comité a décidé d'ajouter de nouvelles fonctions qui nécessitaient auparavant l'utilisation de bibliothèques non-standards. Ces nouvelles fonctions ont un intérêt principalement pour les programmeurs de disciplines scientifiques et pour l'ingénierie. Le tableau suivant montre les 23 fonctions décrites dans TR1<sup class="need_ref_tag" style="padding-left:2px;"><a href="/wiki/Aide:R%C3%A9f%C3%A9rence_n%C3%A9cessaire" title="Aide:Référence nécessaire"><span title="Ce passage nécessite une référence (demandé le septembre 2024) ; voir l'aide.">[réf. nécessaire]</span></a></sup>. </p> <table class="wikitable"> <tbody><tr> <th>Nom de la fonction</th> <th>Prototype de la fonction</th> <th>Expression mathématique </th></tr> <tr> <th><a href="/wiki/Polyn%C3%B4me_de_Laguerre" title="Polynôme de Laguerre">Polynômes de Laguerre généralisés</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">assoc_laguerre</span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="n">n</span><span class="p">,</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="n">m</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {L_{n}}^{m}(x)=(-1)^{m}{\frac {d^{m}}{dx^{m}}}L_{n+m}(x),{\text{ pour }}x\geq 0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>L</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msup> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mo stretchy="false">(</mo> <mo>−<!-- − --></mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msup> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msup> <mrow> <mi>d</mi> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msup> </mrow> </mfrac> </mrow> <msub> <mi>L</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>+</mo> <mi>m</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>,</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mi>x</mi> <mo>≥<!-- ≥ --></mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {L_{n}}^{m}(x)=(-1)^{m}{\frac {d^{m}}{dx^{m}}}L_{n+m}(x),{\text{ pour }}x\geq 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/62568572496e2493b639500a09cef3eb63aa386f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; width:43.332ex; height:5.509ex;" alt="{\displaystyle {L_{n}}^{m}(x)=(-1)^{m}{\frac {d^{m}}{dx^{m}}}L_{n+m}(x),{\text{ pour }}x\geq 0}"></span> </td></tr> <tr> <th><a href="/wiki/Polyn%C3%B4me_de_Legendre" title="Polynôme de Legendre">Polynômes de Legendre généralisés</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">assoc_legendre</span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="n">l</span><span class="p">,</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="n">m</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {P_{l}}^{m}(x)=(1-x^{2})^{m/2}{\frac {d^{m}}{dx^{m}}}P_{l}(x),{\text{ pour }}x\geq 0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>l</mi> </mrow> </msub> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msup> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>2</mn> </mrow> </msup> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msup> <mrow> <mi>d</mi> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msup> </mrow> </mfrac> </mrow> <msub> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>l</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>,</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mi>x</mi> <mo>≥<!-- ≥ --></mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {P_{l}}^{m}(x)=(1-x^{2})^{m/2}{\frac {d^{m}}{dx^{m}}}P_{l}(x),{\text{ pour }}x\geq 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0aab966e667a65e286188ee234250a378e3ca508" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; width:44.498ex; height:5.509ex;" alt="{\displaystyle {P_{l}}^{m}(x)=(1-x^{2})^{m/2}{\frac {d^{m}}{dx^{m}}}P_{l}(x),{\text{ pour }}x\geq 0}"></span> </td></tr> <tr> <th><a href="/wiki/Fonction_b%C3%AAta" title="Fonction bêta">Fonction bêta</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">beta</span><span class="p">(</span><span class="kt">double</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></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle B(x,y)={\frac {\Gamma (x)\Gamma (y)}{\Gamma (x+y)}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>B</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo stretchy="false">)</mo> </mrow> <mrow> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>+</mo> <mi>y</mi> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle B(x,y)={\frac {\Gamma (x)\Gamma (y)}{\Gamma (x+y)}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c219c1e51d7480aeddee59965737932f3fde8127" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:20.036ex; height:6.509ex;" alt="{\displaystyle B(x,y)={\frac {\Gamma (x)\Gamma (y)}{\Gamma (x+y)}}}"></span> </td></tr> <tr> <th><a href="/w/index.php?title=Int%C3%A9grale_elliptique_compl%C3%A8te_de_premier_genre&action=edit&redlink=1" class="new" title="Intégrale elliptique complète de premier genre (page inexistante)">Intégrale elliptique complète de premier genre</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">comp_ellint_1</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">k</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle K(k)=F\left(k,\textstyle {\frac {\pi }{2}}\right)=\int _{0}^{\frac {\pi }{2}}{\frac {d\theta }{\sqrt {1-k^{2}\sin ^{2}\theta }}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>K</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>F</mi> <mrow> <mo>(</mo> <mrow> <mi>k</mi> <mo>,</mo> <mstyle displaystyle="false" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>π<!-- π --></mi> <mn>2</mn> </mfrac> </mrow> </mstyle> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <msubsup> <mo>∫<!-- ∫ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>π<!-- π --></mi> <mn>2</mn> </mfrac> </mrow> </msubsup> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mi>θ<!-- θ --></mi> </mrow> <msqrt> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>k</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mi>sin</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>⁡<!-- --></mo> <mi>θ<!-- θ --></mi> </msqrt> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle K(k)=F\left(k,\textstyle {\frac {\pi }{2}}\right)=\int _{0}^{\frac {\pi }{2}}{\frac {d\theta }{\sqrt {1-k^{2}\sin ^{2}\theta }}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/368908904b7d03d9f568a6742472df083fd3b00c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:39.451ex; height:7.343ex;" alt="{\displaystyle K(k)=F\left(k,\textstyle {\frac {\pi }{2}}\right)=\int _{0}^{\frac {\pi }{2}}{\frac {d\theta }{\sqrt {1-k^{2}\sin ^{2}\theta }}}}"></span> </td></tr> <tr> <th><a href="/w/index.php?title=Int%C3%A9grale_elliptique_compl%C3%A8te_de_deuxi%C3%A8me_genre&action=edit&redlink=1" class="new" title="Intégrale elliptique complète de deuxième genre (page inexistante)">Intégrale elliptique complète de deuxième genre</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">comp_ellint_2</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">k</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle E\left(k,\textstyle {\frac {\pi }{2}}\right)=\int _{0}^{\frac {\pi }{2}}{\sqrt {1-k^{2}\sin ^{2}\theta }}\;d\theta }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>E</mi> <mrow> <mo>(</mo> <mrow> <mi>k</mi> <mo>,</mo> <mstyle displaystyle="false" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>π<!-- π --></mi> <mn>2</mn> </mfrac> </mrow> </mstyle> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <msubsup> <mo>∫<!-- ∫ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>π<!-- π --></mi> <mn>2</mn> </mfrac> </mrow> </msubsup> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>k</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mi>sin</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>⁡<!-- --></mo> <mi>θ<!-- θ --></mi> </msqrt> </mrow> <mspace width="thickmathspace" /> <mi>d</mi> <mi>θ<!-- θ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle E\left(k,\textstyle {\frac {\pi }{2}}\right)=\int _{0}^{\frac {\pi }{2}}{\sqrt {1-k^{2}\sin ^{2}\theta }}\;d\theta }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2a6ea7ea8930045d623298194f314fe083096579" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:33.417ex; height:6.509ex;" alt="{\displaystyle E\left(k,\textstyle {\frac {\pi }{2}}\right)=\int _{0}^{\frac {\pi }{2}}{\sqrt {1-k^{2}\sin ^{2}\theta }}\;d\theta }"></span> </td></tr> <tr> <th><a href="/w/index.php?title=Int%C3%A9grale_elliptique_compl%C3%A8te_de_troisi%C3%A8me_genre&action=edit&redlink=1" class="new" title="Intégrale elliptique complète de troisième genre (page inexistante)">Intégrale elliptique complète de troisième genre</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">comp_ellint_3</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">k</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">nu</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pi \left(\nu ,k,\textstyle {\frac {\pi }{2}}\right)=\int _{0}^{\frac {\pi }{2}}{\frac {d\theta }{(1-\nu \sin ^{2}\theta ){\sqrt {1-k^{2}\sin ^{2}\theta }}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi mathvariant="normal">Π<!-- Π --></mi> <mrow> <mo>(</mo> <mrow> <mi>ν<!-- ν --></mi> <mo>,</mo> <mi>k</mi> <mo>,</mo> <mstyle displaystyle="false" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>π<!-- π --></mi> <mn>2</mn> </mfrac> </mrow> </mstyle> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <msubsup> <mo>∫<!-- ∫ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>π<!-- π --></mi> <mn>2</mn> </mfrac> </mrow> </msubsup> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mi>θ<!-- θ --></mi> </mrow> <mrow> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mi>ν<!-- ν --></mi> <msup> <mi>sin</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>⁡<!-- --></mo> <mi>θ<!-- θ --></mi> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>k</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mi>sin</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>⁡<!-- --></mo> <mi>θ<!-- θ --></mi> </msqrt> </mrow> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pi \left(\nu ,k,\textstyle {\frac {\pi }{2}}\right)=\int _{0}^{\frac {\pi }{2}}{\frac {d\theta }{(1-\nu \sin ^{2}\theta ){\sqrt {1-k^{2}\sin ^{2}\theta }}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/217ae450ac6b65d84173200a70cab9c2797250f2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.338ex; width:46.354ex; height:7.509ex;" alt="{\displaystyle \Pi \left(\nu ,k,\textstyle {\frac {\pi }{2}}\right)=\int _{0}^{\frac {\pi }{2}}{\frac {d\theta }{(1-\nu \sin ^{2}\theta ){\sqrt {1-k^{2}\sin ^{2}\theta }}}}}"></span> </td></tr> <tr> <th><a href="/w/index.php?title=Fonctions_hyperg%C3%A9om%C3%A9triques_confluentes&action=edit&redlink=1" class="new" title="Fonctions hypergéométriques confluentes (page inexistante)">Fonctions hypergéométriques confluentes</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">conf_hyperg</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">c</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle F(a,c,x)={\frac {\Gamma (c)}{\Gamma (a)}}\sum _{n=0}^{\infty }{\frac {\Gamma (a+n)x^{n}}{\Gamma (c+n)n!}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>F</mi> <mo stretchy="false">(</mo> <mi>a</mi> <mo>,</mo> <mi>c</mi> <mo>,</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>c</mi> <mo stretchy="false">)</mo> </mrow> <mrow> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>a</mi> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">∞<!-- ∞ --></mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>a</mi> <mo>+</mo> <mi>n</mi> <mo stretchy="false">)</mo> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mrow> <mrow> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>c</mi> <mo>+</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mi>n</mi> <mo>!</mo> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle F(a,c,x)={\frac {\Gamma (c)}{\Gamma (a)}}\sum _{n=0}^{\infty }{\frac {\Gamma (a+n)x^{n}}{\Gamma (c+n)n!}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2fc254594cbdd750a2fbd54784e14e71936462bc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:33.851ex; height:6.843ex;" alt="{\displaystyle F(a,c,x)={\frac {\Gamma (c)}{\Gamma (a)}}\sum _{n=0}^{\infty }{\frac {\Gamma (a+n)x^{n}}{\Gamma (c+n)n!}}}"></span> </td></tr> <tr> <th><a href="/w/index.php?title=Fonctions_de_Bessel_cylindriques_modifi%C3%A9es_r%C3%A9guli%C3%A8res&action=edit&redlink=1" class="new" title="Fonctions de Bessel cylindriques modifiées régulières (page inexistante)">Fonctions de Bessel cylindriques modifiées régulières</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">cyl_bessel_i</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">nu</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle I_{\nu }(x)=i^{-\nu }J_{\nu }(ix)=\sum _{k=0}^{\infty }{\frac {(x/2)^{\nu +2k}}{k!\;\Gamma (\nu +k+1)}},{\text{ pour }}x\geq 0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>I</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ν<!-- ν --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <msup> <mi>i</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>ν<!-- ν --></mi> </mrow> </msup> <msub> <mi>J</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ν<!-- ν --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>i</mi> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">∞<!-- ∞ --></mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>2</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>ν<!-- ν --></mi> <mo>+</mo> <mn>2</mn> <mi>k</mi> </mrow> </msup> </mrow> <mrow> <mi>k</mi> <mo>!</mo> <mspace width="thickmathspace" /> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>ν<!-- ν --></mi> <mo>+</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> <mo>,</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mi>x</mi> <mo>≥<!-- ≥ --></mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle I_{\nu }(x)=i^{-\nu }J_{\nu }(ix)=\sum _{k=0}^{\infty }{\frac {(x/2)^{\nu +2k}}{k!\;\Gamma (\nu +k+1)}},{\text{ pour }}x\geq 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3bc603a432d6cf0e24d719463d14a7356bc076af" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:53.057ex; height:7.176ex;" alt="{\displaystyle I_{\nu }(x)=i^{-\nu }J_{\nu }(ix)=\sum _{k=0}^{\infty }{\frac {(x/2)^{\nu +2k}}{k!\;\Gamma (\nu +k+1)}},{\text{ pour }}x\geq 0}"></span> </td></tr> <tr> <th><a href="/w/index.php?title=Fonctions_de_Bessel_cylindriques_du_premier_genre&action=edit&redlink=1" class="new" title="Fonctions de Bessel cylindriques du premier genre (page inexistante)">Fonctions de Bessel cylindriques du premier genre</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">cyl_bessel_j</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">nu</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle J_{\nu }(x)=\sum _{k=0}^{\infty }{\frac {(-1)^{k}\;(x/2)^{\nu +2k}}{k!\;\Gamma (\nu +k+1)}},{\text{ pour }}x\geq 0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>J</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ν<!-- ν --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">∞<!-- ∞ --></mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mo>−<!-- − --></mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mspace width="thickmathspace" /> <mo stretchy="false">(</mo> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>2</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>ν<!-- ν --></mi> <mo>+</mo> <mn>2</mn> <mi>k</mi> </mrow> </msup> </mrow> <mrow> <mi>k</mi> <mo>!</mo> <mspace width="thickmathspace" /> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>ν<!-- ν --></mi> <mo>+</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> <mo>,</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mi>x</mi> <mo>≥<!-- ≥ --></mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle J_{\nu }(x)=\sum _{k=0}^{\infty }{\frac {(-1)^{k}\;(x/2)^{\nu +2k}}{k!\;\Gamma (\nu +k+1)}},{\text{ pour }}x\geq 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/96c81216082b562eb7df777a80b5ffd50f48dd29" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:41.692ex; height:7.176ex;" alt="{\displaystyle J_{\nu }(x)=\sum _{k=0}^{\infty }{\frac {(-1)^{k}\;(x/2)^{\nu +2k}}{k!\;\Gamma (\nu +k+1)}},{\text{ pour }}x\geq 0}"></span> </td></tr> <tr> <th><a href="/w/index.php?title=Fonctions_de_Bessel_cylindriques_modifi%C3%A9es_irr%C3%A9guli%C3%A8res&action=edit&redlink=1" class="new" title="Fonctions de Bessel cylindriques modifiées irrégulières (page inexistante)">Fonctions de Bessel cylindriques modifiées irrégulières</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">cyl_bessel_k</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">nu</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}K_{\nu }(x)&=\textstyle {\frac {\pi }{2}}i^{\nu +1}{\big (}J_{\nu }(ix)+iN_{\nu }(ix){\big )}\\&={\begin{cases}\displaystyle {\frac {I_{-\nu }(x)-I_{\nu }(x)}{\sin \nu \pi }},&{\text{ pour }}x\geq 0{\text{ et }}\nu \notin \mathbb {Z} \\[10pt]\displaystyle {\frac {\pi }{2}}\lim _{\mu \to \nu }{\frac {I_{-\mu }(x)-I_{\mu }(x)}{\sin \mu \pi }},&{\text{ pour }}x<0{\text{ et }}\nu \in \mathbb {Z} \\\end{cases}}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <msub> <mi>K</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ν<!-- ν --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mstyle displaystyle="false" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>π<!-- π --></mi> <mn>2</mn> </mfrac> </mrow> <msup> <mi>i</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ν<!-- ν --></mi> <mo>+</mo> <mn>1</mn> </mrow> </msup> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> </mrow> <msub> <mi>J</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ν<!-- ν --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>i</mi> <mi>x</mi> <mo stretchy="false">)</mo> <mo>+</mo> <mi>i</mi> <msub> <mi>N</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ν<!-- ν --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>i</mi> <mi>x</mi> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> </mstyle> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing="1.2em 0.2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msub> <mi>I</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>ν<!-- ν --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>−<!-- − --></mo> <msub> <mi>I</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ν<!-- ν --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> <mrow> <mi>sin</mi> <mo>⁡<!-- --></mo> <mi>ν<!-- ν --></mi> <mi>π<!-- π --></mi> </mrow> </mfrac> </mrow> <mo>,</mo> </mstyle> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mi>x</mi> <mo>≥<!-- ≥ --></mo> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <mtext> et </mtext> </mrow> <mi>ν<!-- ν --></mi> <mo>∉<!-- ∉ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> </mtd> </mtr> <mtr> <mtd> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>π<!-- π --></mi> <mn>2</mn> </mfrac> </mrow> <munder> <mo movablelimits="true" form="prefix">lim</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>μ<!-- μ --></mi> <mo stretchy="false">→<!-- → --></mo> <mi>ν<!-- ν --></mi> </mrow> </munder> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msub> <mi>I</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>μ<!-- μ --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>−<!-- − --></mo> <msub> <mi>I</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>μ<!-- μ --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> <mrow> <mi>sin</mi> <mo>⁡<!-- --></mo> <mi>μ<!-- μ --></mi> <mi>π<!-- π --></mi> </mrow> </mfrac> </mrow> <mo>,</mo> </mstyle> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mi>x</mi> <mo><</mo> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <mtext> et </mtext> </mrow> <mi>ν<!-- ν --></mi> <mo>∈<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}K_{\nu }(x)&=\textstyle {\frac {\pi }{2}}i^{\nu +1}{\big (}J_{\nu }(ix)+iN_{\nu }(ix){\big )}\\&={\begin{cases}\displaystyle {\frac {I_{-\nu }(x)-I_{\nu }(x)}{\sin \nu \pi }},&{\text{ pour }}x\geq 0{\text{ et }}\nu \notin \mathbb {Z} \\[10pt]\displaystyle {\frac {\pi }{2}}\lim _{\mu \to \nu }{\frac {I_{-\mu }(x)-I_{\mu }(x)}{\sin \mu \pi }},&{\text{ pour }}x<0{\text{ et }}\nu \in \mathbb {Z} \\\end{cases}}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9264662e6f527b2df92532052592c7c83c82e1e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -8.338ex; width:58.159ex; height:17.843ex;" alt="{\displaystyle {\begin{aligned}K_{\nu }(x)&=\textstyle {\frac {\pi }{2}}i^{\nu +1}{\big (}J_{\nu }(ix)+iN_{\nu }(ix){\big )}\\&={\begin{cases}\displaystyle {\frac {I_{-\nu }(x)-I_{\nu }(x)}{\sin \nu \pi }},&{\text{ pour }}x\geq 0{\text{ et }}\nu \notin \mathbb {Z} \\[10pt]\displaystyle {\frac {\pi }{2}}\lim _{\mu \to \nu }{\frac {I_{-\mu }(x)-I_{\mu }(x)}{\sin \mu \pi }},&{\text{ pour }}x<0{\text{ et }}\nu \in \mathbb {Z} \\\end{cases}}\end{aligned}}}"></span> </td></tr> <tr> <th><a href="/w/index.php?title=Fonctions_de_Neumann_cylindriques&action=edit&redlink=1" class="new" title="Fonctions de Neumann cylindriques (page inexistante)">Fonctions de Neumann cylindriques</a> <p><a href="/w/index.php?title=Fonctions_de_Bessel_cylindriques_du_deuxi%C3%A8me_genre&action=edit&redlink=1" class="new" title="Fonctions de Bessel cylindriques du deuxième genre (page inexistante)">Fonctions de Bessel cylindriques du deuxième genre</a> </p> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">cyl_neumann</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">nu</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle N_{\nu }(x)={\begin{cases}\displaystyle {\frac {J_{\nu }(x)\cos \nu \pi -J_{-\nu }(x)}{\sin \nu \pi }},&{\text{ pour }}x\geq 0{\text{ et }}\nu \notin \mathbb {Z} \\[10pt]\displaystyle \lim _{\mu \to \nu }{\frac {J_{\mu }(x)\cos \mu \pi -J_{-\mu }(x)}{\sin \mu \pi }},&{\text{ pour }}x<0{\text{ et }}\nu \in \mathbb {Z} \\\end{cases}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>N</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ν<!-- ν --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing="1.2em 0.2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msub> <mi>J</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ν<!-- ν --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mi>cos</mi> <mo>⁡<!-- --></mo> <mi>ν<!-- ν --></mi> <mi>π<!-- π --></mi> <mo>−<!-- − --></mo> <msub> <mi>J</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>ν<!-- ν --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> <mrow> <mi>sin</mi> <mo>⁡<!-- --></mo> <mi>ν<!-- ν --></mi> <mi>π<!-- π --></mi> </mrow> </mfrac> </mrow> <mo>,</mo> </mstyle> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mi>x</mi> <mo>≥<!-- ≥ --></mo> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <mtext> et </mtext> </mrow> <mi>ν<!-- ν --></mi> <mo>∉<!-- ∉ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> </mtd> </mtr> <mtr> <mtd> <mstyle displaystyle="true" scriptlevel="0"> <munder> <mo movablelimits="true" form="prefix">lim</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>μ<!-- μ --></mi> <mo stretchy="false">→<!-- → --></mo> <mi>ν<!-- ν --></mi> </mrow> </munder> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msub> <mi>J</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>μ<!-- μ --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mi>cos</mi> <mo>⁡<!-- --></mo> <mi>μ<!-- μ --></mi> <mi>π<!-- π --></mi> <mo>−<!-- − --></mo> <msub> <mi>J</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>μ<!-- μ --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> <mrow> <mi>sin</mi> <mo>⁡<!-- --></mo> <mi>μ<!-- μ --></mi> <mi>π<!-- π --></mi> </mrow> </mfrac> </mrow> <mo>,</mo> </mstyle> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mi>x</mi> <mo><</mo> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <mtext> et </mtext> </mrow> <mi>ν<!-- ν --></mi> <mo>∈<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle N_{\nu }(x)={\begin{cases}\displaystyle {\frac {J_{\nu }(x)\cos \nu \pi -J_{-\nu }(x)}{\sin \nu \pi }},&{\text{ pour }}x\geq 0{\text{ et }}\nu \notin \mathbb {Z} \\[10pt]\displaystyle \lim _{\mu \to \nu }{\frac {J_{\mu }(x)\cos \mu \pi -J_{-\mu }(x)}{\sin \mu \pi }},&{\text{ pour }}x<0{\text{ et }}\nu \in \mathbb {Z} \\\end{cases}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7f16b675c3a1ad664d326fb645bc8c4c9fd62122" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -6.505ex; width:61.898ex; height:14.176ex;" alt="{\displaystyle N_{\nu }(x)={\begin{cases}\displaystyle {\frac {J_{\nu }(x)\cos \nu \pi -J_{-\nu }(x)}{\sin \nu \pi }},&{\text{ pour }}x\geq 0{\text{ et }}\nu \notin \mathbb {Z} \\[10pt]\displaystyle \lim _{\mu \to \nu }{\frac {J_{\mu }(x)\cos \mu \pi -J_{-\mu }(x)}{\sin \mu \pi }},&{\text{ pour }}x<0{\text{ et }}\nu \in \mathbb {Z} \\\end{cases}}}"></span> </td></tr> <tr> <th><a href="/w/index.php?title=Int%C3%A9grale_elliptique_incompl%C3%A8te_du_premier_genre&action=edit&redlink=1" class="new" title="Intégrale elliptique incomplète du premier genre (page inexistante)">Intégrale elliptique incomplète du premier genre</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">ellint_1</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">k</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">phi</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle F(k,\phi )=\int _{0}^{\phi }{\frac {d\theta }{\sqrt {1-k^{2}\sin ^{2}\theta }}},{\text{ pour }}\left|k\right|\leq 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>F</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>,</mo> <mi>ϕ<!-- ϕ --></mi> <mo stretchy="false">)</mo> <mo>=</mo> <msubsup> <mo>∫<!-- ∫ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>ϕ<!-- ϕ --></mi> </mrow> </msubsup> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mi>θ<!-- θ --></mi> </mrow> <msqrt> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>k</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mi>sin</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>⁡<!-- --></mo> <mi>θ<!-- θ --></mi> </msqrt> </mfrac> </mrow> <mo>,</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mrow> <mo>|</mo> <mi>k</mi> <mo>|</mo> </mrow> <mo>≤<!-- ≤ --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle F(k,\phi )=\int _{0}^{\phi }{\frac {d\theta }{\sqrt {1-k^{2}\sin ^{2}\theta }}},{\text{ pour }}\left|k\right|\leq 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e7c3b50065e45ea8623b89135ab86323f87ff56c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:43.552ex; height:7.176ex;" alt="{\displaystyle F(k,\phi )=\int _{0}^{\phi }{\frac {d\theta }{\sqrt {1-k^{2}\sin ^{2}\theta }}},{\text{ pour }}\left|k\right|\leq 1}"></span> </td></tr> <tr> <th><a href="/w/index.php?title=Int%C3%A9grale_elliptique_incompl%C3%A8te_du_deuxi%C3%A8me_genre&action=edit&redlink=1" class="new" title="Intégrale elliptique incomplète du deuxième genre (page inexistante)">Intégrale elliptique incomplète du deuxième genre</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">ellint_2</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">k</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">phi</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \displaystyle E(k,\phi )=\int _{0}^{\phi }{\sqrt {1-k^{2}\sin ^{2}\theta }}d\theta ,{\text{ pour }}\left|k\right|\leq 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mstyle displaystyle="true" scriptlevel="0"> <mi>E</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>,</mo> <mi>ϕ<!-- ϕ --></mi> <mo stretchy="false">)</mo> <mo>=</mo> <msubsup> <mo>∫<!-- ∫ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>ϕ<!-- ϕ --></mi> </mrow> </msubsup> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>k</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mi>sin</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>⁡<!-- --></mo> <mi>θ<!-- θ --></mi> </msqrt> </mrow> <mi>d</mi> <mi>θ<!-- θ --></mi> <mo>,</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mrow> <mo>|</mo> <mi>k</mi> <mo>|</mo> </mrow> <mo>≤<!-- ≤ --></mo> <mn>1</mn> </mstyle> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \displaystyle E(k,\phi )=\int _{0}^{\phi }{\sqrt {1-k^{2}\sin ^{2}\theta }}d\theta ,{\text{ pour }}\left|k\right|\leq 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2dd081caa0e1a8bcc5c62284b9ad473e8c1972fd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:45.057ex; height:6.343ex;" alt="{\displaystyle \displaystyle E(k,\phi )=\int _{0}^{\phi }{\sqrt {1-k^{2}\sin ^{2}\theta }}d\theta ,{\text{ pour }}\left|k\right|\leq 1}"></span> </td></tr> <tr> <th><a href="/w/index.php?title=Int%C3%A9grale_elliptique_incompl%C3%A8te_du_troisi%C3%A8me_genre&action=edit&redlink=1" class="new" title="Intégrale elliptique incomplète du troisième genre (page inexistante)">Intégrale elliptique incomplète du troisième genre</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">ellint_3</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">k</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">nu</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">phi</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pi (k,\nu ,\phi )=\int _{0}^{\phi }{\frac {d\theta }{\left(1-\nu \sin ^{2}\theta \right){\sqrt {1-k^{2}\sin ^{2}\theta }}}},{\text{ pour }}\left|k\right|\leq 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi mathvariant="normal">Π<!-- Π --></mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>,</mo> <mi>ν<!-- ν --></mi> <mo>,</mo> <mi>ϕ<!-- ϕ --></mi> <mo stretchy="false">)</mo> <mo>=</mo> <msubsup> <mo>∫<!-- ∫ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>ϕ<!-- ϕ --></mi> </mrow> </msubsup> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mi>θ<!-- θ --></mi> </mrow> <mrow> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mi>ν<!-- ν --></mi> <msup> <mi>sin</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>⁡<!-- --></mo> <mi>θ<!-- θ --></mi> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>k</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mi>sin</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>⁡<!-- --></mo> <mi>θ<!-- θ --></mi> </msqrt> </mrow> </mrow> </mfrac> </mrow> <mo>,</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mrow> <mo>|</mo> <mi>k</mi> <mo>|</mo> </mrow> <mo>≤<!-- ≤ --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pi (k,\nu ,\phi )=\int _{0}^{\phi }{\frac {d\theta }{\left(1-\nu \sin ^{2}\theta \right){\sqrt {1-k^{2}\sin ^{2}\theta }}}},{\text{ pour }}\left|k\right|\leq 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b872c881ba400868163de531d631358629160dc9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.505ex; width:59.347ex; height:7.509ex;" alt="{\displaystyle \Pi (k,\nu ,\phi )=\int _{0}^{\phi }{\frac {d\theta }{\left(1-\nu \sin ^{2}\theta \right){\sqrt {1-k^{2}\sin ^{2}\theta }}}},{\text{ pour }}\left|k\right|\leq 1}"></span> </td></tr> <tr> <th><a href="/wiki/Exponentielle_int%C3%A9grale" title="Exponentielle intégrale">Intégrale exponentielle</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">expint</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mbox{E}}i(x)=-\int _{-x}^{\infty }{\frac {e^{-t}}{t}}\,dt}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mtext>E</mtext> </mstyle> </mrow> <mi>i</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mo>−<!-- − --></mo> <msubsup> <mo>∫<!-- ∫ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>x</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">∞<!-- ∞ --></mi> </mrow> </msubsup> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>t</mi> </mrow> </msup> <mi>t</mi> </mfrac> </mrow> <mspace width="thinmathspace" /> <mi>d</mi> <mi>t</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\mbox{E}}i(x)=-\int _{-x}^{\infty }{\frac {e^{-t}}{t}}\,dt}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b1fbcf06b573d9a5079fdb5116c03462da5e388a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:22.011ex; height:6.176ex;" alt="{\displaystyle {\mbox{E}}i(x)=-\int _{-x}^{\infty }{\frac {e^{-t}}{t}}\,dt}"></span> </td></tr> <tr> <th><a href="/wiki/Polyn%C3%B4me_d%27Hermite" title="Polynôme d'Hermite">Polynômes d'Hermite</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">hermite</span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="n">n</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle H_{n}(x)=(-1)^{n}e^{x^{2}}{\frac {d^{n}}{dx^{n}}}e^{-x^{2}}\,\!}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>H</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mo stretchy="false">(</mo> <mo>−<!-- − --></mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mrow> </msup> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> <mrow> <mi>d</mi> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mrow> </mfrac> </mrow> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mrow> </msup> <mspace width="thinmathspace" /> <mspace width="negativethinmathspace" /> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle H_{n}(x)=(-1)^{n}e^{x^{2}}{\frac {d^{n}}{dx^{n}}}e^{-x^{2}}\,\!}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e0280dcfe41fd2c27275a11ee645edfdfaebd4e0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; margin-right: -0.387ex; width:27.826ex; height:5.509ex;" alt="{\displaystyle H_{n}(x)=(-1)^{n}e^{x^{2}}{\frac {d^{n}}{dx^{n}}}e^{-x^{2}}\,\!}"></span> </td></tr> <tr> <th><a href="/wiki/S%C3%A9rie_hyperg%C3%A9om%C3%A9trique" title="Série hypergéométrique">Séries hypergéométriques</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">hyperg</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">c</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle F(a,b,c,x)={\frac {\Gamma (c)}{\Gamma (a)\Gamma (b)}}\sum _{n=0}^{\infty }{\frac {\Gamma (a+n)\Gamma (b+n)}{\Gamma (c+n)}}{\frac {x^{n}}{n!}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>F</mi> <mo stretchy="false">(</mo> <mi>a</mi> <mo>,</mo> <mi>b</mi> <mo>,</mo> <mi>c</mi> <mo>,</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>c</mi> <mo stretchy="false">)</mo> </mrow> <mrow> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>a</mi> <mo stretchy="false">)</mo> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>b</mi> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">∞<!-- ∞ --></mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>a</mi> <mo>+</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>b</mi> <mo>+</mo> <mi>n</mi> <mo stretchy="false">)</mo> </mrow> <mrow> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mi>c</mi> <mo>+</mo> <mi>n</mi> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> <mrow> <mi>n</mi> <mo>!</mo> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle F(a,b,c,x)={\frac {\Gamma (c)}{\Gamma (a)\Gamma (b)}}\sum _{n=0}^{\infty }{\frac {\Gamma (a+n)\Gamma (b+n)}{\Gamma (c+n)}}{\frac {x^{n}}{n!}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ae1dc6a7e6fca01ed360c0094baba7671a27e7fb" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:49.473ex; height:6.843ex;" alt="{\displaystyle F(a,b,c,x)={\frac {\Gamma (c)}{\Gamma (a)\Gamma (b)}}\sum _{n=0}^{\infty }{\frac {\Gamma (a+n)\Gamma (b+n)}{\Gamma (c+n)}}{\frac {x^{n}}{n!}}}"></span> </td></tr> <tr> <th><a href="/wiki/Polyn%C3%B4mes_de_Laguerre" class="mw-redirect" title="Polynômes de Laguerre">Polynômes de Laguerre</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">laguerre</span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="n">n</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle L_{n}(x)={\frac {e^{x}}{n!}}{\frac {d^{n}}{dx^{n}}}\left(x^{n}e^{-x}\right),{\text{ pour }}x\geq 0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>L</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>x</mi> </mrow> </msup> <mrow> <mi>n</mi> <mo>!</mo> </mrow> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> <mrow> <mi>d</mi> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mrow> </mfrac> </mrow> <mrow> <mo>(</mo> <mrow> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>x</mi> </mrow> </msup> </mrow> <mo>)</mo> </mrow> <mo>,</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mi>x</mi> <mo>≥<!-- ≥ --></mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle L_{n}(x)={\frac {e^{x}}{n!}}{\frac {d^{n}}{dx^{n}}}\left(x^{n}e^{-x}\right),{\text{ pour }}x\geq 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1630eb488d759b2a0f3043f399ec47d864bacad9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; width:38.163ex; height:5.509ex;" alt="{\displaystyle L_{n}(x)={\frac {e^{x}}{n!}}{\frac {d^{n}}{dx^{n}}}\left(x^{n}e^{-x}\right),{\text{ pour }}x\geq 0}"></span> </td></tr> <tr> <th><a href="/wiki/Polyn%C3%B4mes_de_Legendre" class="mw-redirect" title="Polynômes de Legendre">Polynômes de Legendre</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">legendre</span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="n">l</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P_{l}(x)={1 \over 2^{l}l!}{d^{l} \over dx^{l}}(x^{2}-1)^{l},{\text{ pour }}\left|x\right|\leq 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>l</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>l</mi> </mrow> </msup> <mi>l</mi> <mo>!</mo> </mrow> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>l</mi> </mrow> </msup> <mrow> <mi>d</mi> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>l</mi> </mrow> </msup> </mrow> </mfrac> </mrow> <mo stretchy="false">(</mo> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>l</mi> </mrow> </msup> <mo>,</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mrow> <mo>|</mo> <mi>x</mi> <mo>|</mo> </mrow> <mo>≤<!-- ≤ --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P_{l}(x)={1 \over 2^{l}l!}{d^{l} \over dx^{l}}(x^{2}-1)^{l},{\text{ pour }}\left|x\right|\leq 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a33ccd2909ff0440cf05635f07b298c0a4bd1c3f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:39.662ex; height:6.176ex;" alt="{\displaystyle P_{l}(x)={1 \over 2^{l}l!}{d^{l} \over dx^{l}}(x^{2}-1)^{l},{\text{ pour }}\left|x\right|\leq 1}"></span> </td></tr> <tr> <th><a href="/wiki/Fonction_z%C3%AAta_de_Riemann" title="Fonction zêta de Riemann">Fonction zêta de Riemann</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">riemann_zeta</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathrm {Z} (x)={\begin{cases}\displaystyle \sum _{k=1}^{\infty }k^{-x},&{\text{ pour }}x>1\\[10pt]\displaystyle 2^{x}\pi ^{x-1}\sin \left({\frac {x\pi }{2}}\right)\Gamma (1-x)\zeta (1-x),&{\text{ pour }}x<1\\\end{cases}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">Z</mi> </mrow> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing="1.2em 0.2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <mstyle displaystyle="true" scriptlevel="0"> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">∞<!-- ∞ --></mi> </mrow> </munderover> <msup> <mi>k</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>x</mi> </mrow> </msup> <mo>,</mo> </mstyle> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mi>x</mi> <mo>></mo> <mn>1</mn> </mtd> </mtr> <mtr> <mtd> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>x</mi> </mrow> </msup> <msup> <mi>π<!-- π --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>x</mi> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msup> <mi>sin</mi> <mo>⁡<!-- --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>x</mi> <mi>π<!-- π --></mi> </mrow> <mn>2</mn> </mfrac> </mrow> <mo>)</mo> </mrow> <mi mathvariant="normal">Γ<!-- Γ --></mi> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mi>x</mi> <mo stretchy="false">)</mo> <mi>ζ<!-- ζ --></mi> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>,</mo> </mstyle> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mi>x</mi> <mo><</mo> <mn>1</mn> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathrm {Z} (x)={\begin{cases}\displaystyle \sum _{k=1}^{\infty }k^{-x},&{\text{ pour }}x>1\\[10pt]\displaystyle 2^{x}\pi ^{x-1}\sin \left({\frac {x\pi }{2}}\right)\Gamma (1-x)\zeta (1-x),&{\text{ pour }}x<1\\\end{cases}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2acb2198aad9f452686fc5171aec3916f4cb64a1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -6.505ex; width:58.145ex; height:14.176ex;" alt="{\displaystyle \mathrm {Z} (x)={\begin{cases}\displaystyle \sum _{k=1}^{\infty }k^{-x},&{\text{ pour }}x>1\\[10pt]\displaystyle 2^{x}\pi ^{x-1}\sin \left({\frac {x\pi }{2}}\right)\Gamma (1-x)\zeta (1-x),&{\text{ pour }}x<1\\\end{cases}}}"></span> </td></tr> <tr> <th><a href="/w/index.php?title=Fonctions_sph%C3%A9riques_de_Bessel_du_premier_genre&action=edit&redlink=1" class="new" title="Fonctions sphériques de Bessel du premier genre (page inexistante)">Fonctions sphériques de Bessel du premier genre</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">sph_bessel</span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="n">n</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle j_{n}(x)={\sqrt {\frac {\pi }{2x}}}J_{n+1/2}(x),{\text{ pour }}x\geq 0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>j</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mfrac> <mi>π<!-- π --></mi> <mrow> <mn>2</mn> <mi>x</mi> </mrow> </mfrac> </msqrt> </mrow> <msub> <mi>J</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>+</mo> <mn>1</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>2</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>,</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mi>x</mi> <mo>≥<!-- ≥ --></mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle j_{n}(x)={\sqrt {\frac {\pi }{2x}}}J_{n+1/2}(x),{\text{ pour }}x\geq 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d23995602fb6551c19117f4814c67cb48cfb83a1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; margin-left: -0.027ex; width:35.93ex; height:6.343ex;" alt="{\displaystyle j_{n}(x)={\sqrt {\frac {\pi }{2x}}}J_{n+1/2}(x),{\text{ pour }}x\geq 0}"></span> </td></tr> <tr> <th><a href="/wiki/Harmonique_sph%C3%A9rique#Expression_des_harmoniques_sphériques_normalisées" title="Harmonique sphérique">Fonctions sphériques de Legendre généralisées</a> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">sph_legendre</span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="n">l</span><span class="p">,</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="n">m</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">theta</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Y_{l}^{m}(\theta ,0){\text{ avec }}Y_{l}^{m}(\theta ,\phi )=(-1)^{m}\left[{\frac {(2l+1)}{4\pi }}{\frac {(l-m)!}{(l+m)!}}\right]^{1 \over 2}P_{l}^{m}(cos\theta )e^{im\phi }{\text{ pour }}|m|\leq l}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>l</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msubsup> <mo stretchy="false">(</mo> <mi>θ<!-- θ --></mi> <mo>,</mo> <mn>0</mn> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext> avec </mtext> </mrow> <msubsup> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>l</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msubsup> <mo stretchy="false">(</mo> <mi>θ<!-- θ --></mi> <mo>,</mo> <mi>ϕ<!-- ϕ --></mi> <mo stretchy="false">)</mo> <mo>=</mo> <mo stretchy="false">(</mo> <mo>−<!-- − --></mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msup> <msup> <mrow> <mo>[</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mn>2</mn> <mi>l</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <mrow> <mn>4</mn> <mi>π<!-- π --></mi> </mrow> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>l</mi> <mo>−<!-- − --></mo> <mi>m</mi> <mo stretchy="false">)</mo> <mo>!</mo> </mrow> <mrow> <mo stretchy="false">(</mo> <mi>l</mi> <mo>+</mo> <mi>m</mi> <mo stretchy="false">)</mo> <mo>!</mo> </mrow> </mfrac> </mrow> </mrow> <mo>]</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mrow> </msup> <msubsup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>l</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msubsup> <mo stretchy="false">(</mo> <mi>c</mi> <mi>o</mi> <mi>s</mi> <mi>θ<!-- θ --></mi> <mo stretchy="false">)</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mi>m</mi> <mi>ϕ<!-- ϕ --></mi> </mrow> </msup> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> <mi>m</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> <mo>≤<!-- ≤ --></mo> <mi>l</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Y_{l}^{m}(\theta ,0){\text{ avec }}Y_{l}^{m}(\theta ,\phi )=(-1)^{m}\left[{\frac {(2l+1)}{4\pi }}{\frac {(l-m)!}{(l+m)!}}\right]^{1 \over 2}P_{l}^{m}(cos\theta )e^{im\phi }{\text{ pour }}|m|\leq l}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/05949cd2001fa410fdacc68aac8b7c376540c393" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:81.169ex; height:7.509ex;" alt="{\displaystyle Y_{l}^{m}(\theta ,0){\text{ avec }}Y_{l}^{m}(\theta ,\phi )=(-1)^{m}\left[{\frac {(2l+1)}{4\pi }}{\frac {(l-m)!}{(l+m)!}}\right]^{1 \over 2}P_{l}^{m}(cos\theta )e^{im\phi }{\text{ pour }}|m|\leq l}"></span> </td></tr> <tr> <th><a href="/w/index.php?title=Fonctions_sph%C3%A9riques_de_Neumann&action=edit&redlink=1" class="new" title="Fonctions sphériques de Neumann (page inexistante)">Fonctions sphériques de Neumann</a> <p><a href="/w/index.php?title=Fonctions_sph%C3%A9riques_de_Bessel_du_deuxi%C3%A8me_genre&action=edit&redlink=1" class="new" title="Fonctions sphériques de Bessel du deuxième genre (page inexistante)">Fonctions sphériques de Bessel du deuxième genre</a> </p> </th> <td><code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">double</span><span class="w"> </span><span class="nf">sph_neumann</span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="n">n</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="p">);</span></code></td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n_{n}(x)={\sqrt {\frac {\pi }{2x}}}N_{n+1/2}(x){\text{ pour }}x\geq 0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mfrac> <mi>π<!-- π --></mi> <mrow> <mn>2</mn> <mi>x</mi> </mrow> </mfrac> </msqrt> </mrow> <msub> <mi>N</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>+</mo> <mn>1</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>2</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext> pour </mtext> </mrow> <mi>x</mi> <mo>≥<!-- ≥ --></mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n_{n}(x)={\sqrt {\frac {\pi }{2x}}}N_{n+1/2}(x){\text{ pour }}x\geq 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5288d1cf88e614403a68c527abb61d62d3ddb0a9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:35.882ex; height:6.343ex;" alt="{\displaystyle n_{n}(x)={\sqrt {\frac {\pi }{2x}}}N_{n+1/2}(x){\text{ pour }}x\geq 0}"></span> </td></tr></tbody></table> <p>Chacune de ces fonctions possède deux variantes supplémentaires. En rajoutant le suffixe <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">f</span></code> ou <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">l</span></code> au nom de la fonction, on obtient les mêmes fonctions agissant sur des <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">float</span></code> ou des <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="kt">long</span><span class="w"> </span><span class="kt">double</span></code> respectivement. Par exemple : </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="kt">float</span><span class="w"> </span><span class="nf">sph_neumannf</span><span class="p">(</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="n">n</span><span class="p">,</span><span class="w"> </span><span class="kt">float</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">;</span> <span class="kt">long</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="nf">sph_neumannl</span><span class="p">(</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="n">n</span><span class="p">,</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">;</span> </pre></div> <div class="mw-heading mw-heading2"><h2 id="Notes_et_références"><span id="Notes_et_r.C3.A9f.C3.A9rences"></span>Notes et références</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=31" title="Modifier la section : Notes et références" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=31" title="Modifier le code source de la section : Notes et références"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Notes">Notes</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=32" title="Modifier la section : Notes" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=32" title="Modifier le code source de la section : Notes"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="references-small decimal" style=""><div class="mw-references-wrap"><ol class="references"> <li id="cite_note-19"><span class="mw-cite-backlink noprint"><a href="#cite_ref-19">↑</a> </span><span class="reference-text">L'algorithme <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><span class="n">std</span><span class="o">::</span><span class="n">for_each</span></code> du C++ ne sert qu'à appliquer une fonction à tous les éléments d'une séquence de conteneur (voir <a rel="nofollow" class="external text" href="http://www.cplusplus.com/reference/algorithm/for_each/">la documentation de cette fonction</a>).</span> </li> <li id="cite_note-21"><span class="mw-cite-backlink noprint"><a href="#cite_ref-21">↑</a> </span><span class="reference-text">Explication détaillée et exemples en 3 parties : <span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> « <a rel="nofollow" class="external text" href="https://akrzemi1.wordpress.com/2012/08/12/user-defined-literals-part-i/"><cite style="font-style:normal;" lang="en">Partie 1</cite></a> »</span> - <span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> « <a rel="nofollow" class="external text" href="https://akrzemi1.wordpress.com/2012/10/23/user-defined-literals-part-ii/"><cite style="font-style:normal;" lang="en">Partie 2</cite></a> »</span> - <span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> « <a rel="nofollow" class="external text" href="https://akrzemi1.wordpress.com/2012/10/29/user-defined-literals-part-iii/"><cite style="font-style:normal;" lang="en">Partie 3</cite></a> »</span>.</span> </li> </ol></div> </div> <div class="mw-heading mw-heading3"><h3 id="Références"><span id="R.C3.A9f.C3.A9rences"></span>Références</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=33" title="Modifier la section : Références" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=33" title="Modifier le code source de la section : Références"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="references-small decimal" style=""><div class="mw-references-wrap mw-references-columns"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink noprint"><a href="#cite_ref-1">↑</a> </span><span class="reference-text">Blog d'<a href="/wiki/Herb_Sutter" title="Herb Sutter">Herb Sutter</a> : <a rel="nofollow" class="external text" href="http://herbsutter.wordpress.com/2010/03/13/trip-report-march-2010-iso-c-standards-meeting/">March 2010 ISO C++ Standards Meeting</a>.</span> </li> <li id="cite_note-2"><span class="mw-cite-backlink noprint"><a href="#cite_ref-2">↑</a> </span><span class="reference-text">Blog d'<a href="/wiki/Herb_Sutter" title="Herb Sutter">Herb Sutter</a> : <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>.</span> </li> <li id="cite_note-3"><span class="mw-cite-backlink noprint"><a href="#cite_ref-3">↑</a> </span><span class="reference-text"><span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> « <a rel="nofollow" class="external text" href="http://www.iso.org/iso/fr/catalogue_detail?csnumber=50372"><cite style="font-style:normal;" lang="en">ISO/CEI 14882:2011</cite></a> », ISO</span>.</span> </li> <li id="cite_note-4"><span class="mw-cite-backlink noprint"><a href="#cite_ref-4">↑</a> </span><span class="reference-text"><span class="ouvrage" id="SutterGlassborow2006‐04‐06"><span class="ouvrage" id="Herb_SutterFrancis_Glassborow2006‐04‐06"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Herb Sutter et Francis Glassborow, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf"><cite style="font-style:normal;" lang="en">N1986 - Delegating Constructors</cite></a> » <abbr class="abbr indicateur-format format-pdf" title="Document au format Portable Document Format (PDF) d'Adobe">[PDF]</abbr>, 2006‐04‐06</span></span>.</span> </li> <li id="cite_note-5"><span class="mw-cite-backlink noprint"><a href="#cite_ref-5">↑</a> </span><span class="reference-text"><span class="ouvrage" id="MeredithWongMaurer2008"><span class="ouvrage" id="Alisdair_MeredithMichael_WongJens_Maurer2008"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Alisdair Meredith, Michael Wong et Jens Maurer, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm"><cite style="font-style:normal;" lang="en">N2540 - Inheriting Constructors</cite></a> », <time class="nowrap" datetime="2008-02-29" data-sort-value="2008-02-29">29 février 2008</time></span></span>.</span> </li> <li id="cite_note-6"><span class="mw-cite-backlink noprint"><a href="#cite_ref-6">↑</a> </span><span class="reference-text"><span class="ouvrage" id="MerrillVandevoorde2008"><span class="ouvrage" id="Jason_MerrillDaveed_Vandevoorde2008"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Jason Merrill et Daveed Vandevoorde, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm"><cite style="font-style:normal;" lang="en">N2672 - Initializer List proposed wording</cite></a> », <time class="nowrap" datetime="2008-06-12" data-sort-value="2008-06-12">12 juin 2008</time></span></span>.</span> </li> <li id="cite_note-7"><span class="mw-cite-backlink noprint"><a href="#cite_ref-7">↑</a> </span><span class="reference-text"><span class="ouvrage" id="GregorJärviMaurerMerrill2007"><span class="ouvrage" id="Douglas_GregorJaakko_JärviJens_MaurerJason_Merrill2007"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Douglas Gregor, Jaakko Järvi, Jens Maurer et Jason Merrill, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf"><cite style="font-style:normal;" lang="en">N2242 - Proposed Wording for Variadic Templates</cite></a> » <abbr class="abbr indicateur-format format-pdf" title="Document au format Portable Document Format (PDF) d'Adobe">[PDF]</abbr>, <time class="nowrap" datetime="2007-04-19" data-sort-value="2007-04-19">19 avril 2007</time></span></span>.</span> </li> <li id="cite_note-8"><span class="mw-cite-backlink noprint"><a href="#cite_ref-8">↑</a> </span><span class="reference-text"><span class="ouvrage" id="GregorNiebler2008"><span class="ouvrage" id="Douglas_GregorEric_Niebler2008"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Douglas Gregor et Eric Niebler, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf"><cite style="font-style:normal;" lang="en">N2555 - Extending Variadic Template Template Parameters</cite></a> » <abbr class="abbr indicateur-format format-pdf" title="Document au format Portable Document Format (PDF) d'Adobe">[PDF]</abbr>, <time class="nowrap" datetime="2008-02-29" data-sort-value="2008-02-29">29 février 2008</time></span></span>.</span> </li> <li id="cite_note-9"><span class="mw-cite-backlink noprint"><a href="#cite_ref-9">↑</a> </span><span class="reference-text"><span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> « <a rel="nofollow" class="external text" href="http://gcc.gnu.org/gcc-4.3/cxx0x_status.html"><cite style="font-style:normal;" lang="en">Status of Experimental C++0x Support in GCC 4.3 – GNU Project – Free Software Foundation (FSF)</cite></a> »</span>.</span> </li> <li id="cite_note-10"><span class="mw-cite-backlink noprint"><a href="#cite_ref-10">↑</a> </span><span class="reference-text"><span class="ouvrage" id="Vandevoorde2005"><span class="ouvrage" id="Daveed_Vandevoorde2005"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Daveed Vandevoorde, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html"><cite style="font-style:normal;" lang="en">N1757 - Right Angle Brackets</cite></a> », <time class="nowrap" datetime="2005-01-14" data-sort-value="2005-01-14">14 janvier 2005</time></span></span>.</span> </li> <li id="cite_note-11"><span class="mw-cite-backlink noprint"><a href="#cite_ref-11">↑</a> </span><span class="reference-text"><span class="ouvrage" id="Spicer2006"><span class="ouvrage" id="John_Spicer2006"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> John Spicer, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm"><cite style="font-style:normal;" lang="en">N1987 - Adding "extern template"</cite></a> », <time class="nowrap" datetime="2006-04-06" data-sort-value="2006-04-06">6 avril 2006</time></span></span>.</span> </li> <li id="cite_note-12"><span class="mw-cite-backlink noprint"><a href="#cite_ref-12">↑</a> </span><span class="reference-text"><span class="ouvrage" id="KlarerJohn_MaddockDawesHinnant2004"><span class="ouvrage" id="Robert_KlarerDr._John_MaddockBeman_DawesHoward_Hinnant2004"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Robert Klarer, Dr. John Maddock, Beman Dawes et Howard Hinnant, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html"><cite style="font-style:normal;" lang="en">N1720 - Proposal to Add Static Assertions to the Core Language</cite></a> », <time class="nowrap" datetime="2004-10-20" data-sort-value="2004-10-20">20 octobre 2004</time></span></span>.</span> </li> <li id="cite_note-13"><span class="mw-cite-backlink noprint"><a href="#cite_ref-13">↑</a> </span><span class="reference-text"><span class="ouvrage" id="JärviStroustrupDos_Reis2006"><span class="ouvrage" id="Jaakko_JärviBjarne_StroustrupGabriel_Dos_Reis2006"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Jaakko Järvi, Bjarne Stroustrup et Gabriel Dos Reis, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf"><cite style="font-style:normal;" lang="en">N1984 - Deducing the type of variable from its initializer expression</cite></a> » <abbr class="abbr indicateur-format format-pdf" title="Document au format Portable Document Format (PDF) d'Adobe">[PDF]</abbr>, <time class="nowrap" datetime="2006-04-06" data-sort-value="2006-04-06">6 avril 2006</time></span></span>.</span> </li> <li id="cite_note-14"><span class="mw-cite-backlink noprint"><a href="#cite_ref-14">↑</a> </span><span class="reference-text"><span class="ouvrage" id="JärviFreemanCrowl2008"><span class="ouvrage" id="Jaakko_JärviJohn_FreemanLawrence_Crowl2008"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Jaakko Järvi, John Freeman et Lawrence Crowl, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2550.pdf"><cite style="font-style:normal;" lang="en">N2550 - Lambda Expressions and Closures: Wording for Monomorphic Lambdas</cite></a> » <abbr class="abbr indicateur-format format-pdf" title="Document au format Portable Document Format (PDF) d'Adobe">[PDF]</abbr>, <time class="nowrap" datetime="2008-02-29" data-sort-value="2008-02-29">29 février 2008</time></span></span>.</span> </li> <li id="cite_note-15"><span class="mw-cite-backlink noprint"><a href="#cite_ref-15">↑</a> </span><span class="reference-text"><span class="ouvrage" id="JärviDimovFreeman2008"><span class="ouvrage" id="Jaakko_JärviPeter_DimovJohn_Freeman2008"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Jaakko Järvi, Peter Dimov et John Freeman, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2658.pdf"><cite style="font-style:normal;" lang="en">N2658 - Constness of Lambda Functions</cite></a> » <abbr class="abbr indicateur-format format-pdf" title="Document au format Portable Document Format (PDF) d'Adobe">[PDF]</abbr>, <time class="nowrap" datetime="2008-06-12" data-sort-value="2008-06-12">12 juin 2008</time></span></span>.</span> </li> <li id="cite_note-16"><span class="mw-cite-backlink noprint"><a href="#cite_ref-16">↑</a> </span><span class="reference-text"><span class="ouvrage" id="Vandevoorde2009"><span class="ouvrage" id="Daveed_Vandevoorde2009"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Daveed Vandevoorde, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2927.pdf"><cite style="font-style:normal;" lang="en">N2927 - New wording for C++0x Lambdas</cite></a> » <abbr class="abbr indicateur-format format-pdf" title="Document au format Portable Document Format (PDF) d'Adobe">[PDF]</abbr>, <time class="nowrap" datetime="2009-07-15" data-sort-value="2009-07-15">15 juillet 2009</time></span></span>.</span> </li> <li id="cite_note-17"><span class="mw-cite-backlink noprint"><a href="#cite_ref-17">↑</a> </span><span class="reference-text"><span class="ouvrage" id="SutterMiller2004"><span class="ouvrage" id="Herb_SutterDavid_E._Miller2004"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Herb Sutter et David E. Miller, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf"><cite style="font-style:normal;" lang="en">N1719 - Strongly Typed Enums</cite></a> » <abbr class="abbr indicateur-format format-pdf" title="Document au format Portable Document Format (PDF) d'Adobe">[PDF]</abbr>, <time class="nowrap" datetime="2004-10-21" data-sort-value="2004-10-21">21 octobre 2004</time></span></span>.</span> </li> <li id="cite_note-18"><span class="mw-cite-backlink noprint"><a href="#cite_ref-18">↑</a> </span><span class="reference-text"><span class="ouvrage" id="GregorDawes2009"><span class="ouvrage" id="Douglas_GregorBeman_Dawes2009"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Douglas Gregor et Beman Dawes, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2930.html"><cite style="font-style:normal;" lang="en">N2930 - Range-Based For Loop Wording</cite></a> », <time class="nowrap" datetime="2009-07-16" data-sort-value="2009-07-16">16 juillet 2009</time></span></span>.</span> </li> <li id="cite_note-20"><span class="mw-cite-backlink noprint"><a href="#cite_ref-20">↑</a> </span><span class="reference-text"><span class="ouvrage" id="McIntoshWongMak2008"><span class="ouvrage" id="Ian_McIntoshMichael_WongRaymond_Mak2008"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Ian McIntosh, Michael Wong, Raymond Mak <i><abbr class="abbr" title="et alii (et d’autres)">et al.</abbr></i>, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf"><cite style="font-style:normal;" lang="en">N2765 - User-defined Literals</cite></a> » <abbr class="abbr indicateur-format format-pdf" title="Document au format Portable Document Format (PDF) d'Adobe">[PDF]</abbr>, <time class="nowrap" datetime="2008-09-18" data-sort-value="2008-09-18">18 septembre 2008</time></span></span>.</span> </li> <li id="cite_note-22"><span class="mw-cite-backlink noprint"><a href="#cite_ref-22">↑</a> </span><span class="reference-text"><span class="ouvrage" id="SutterStroustrup2007"><span class="ouvrage" id="Herb_SutterBjarne_Stroustrup2007"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Herb Sutter et Bjarne Stroustrup, « <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf"><cite style="font-style:normal;" lang="en">N2431 - A name for the null pointer: nullptr</cite></a> » <abbr class="abbr indicateur-format format-pdf" title="Document au format Portable Document Format (PDF) d'Adobe">[PDF]</abbr>, <time class="nowrap" datetime="2007-10-02" data-sort-value="2007-10-02">2 octobre 2007</time></span></span>.</span> </li> </ol></div> </div> <div class="mw-heading mw-heading2"><h2 id="Voir_aussi">Voir aussi</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=34" title="Modifier la section : Voir aussi" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=34" title="Modifier le code source de la section : Voir aussi"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Articles_connexes">Articles connexes</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=35" title="Modifier la section : Articles connexes" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=35" title="Modifier le code source de la section : Articles connexes"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Allocateur_(C%2B%2B)" title="Allocateur (C++)">Allocateur (C++)</a></li></ul> <div class="mw-heading mw-heading3"><h3 id="Liens_externes">Liens externes</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=C%2B%2B11&veaction=edit&section=36" title="Modifier la section : Liens externes" class="mw-editsection-visualeditor"><span>modifier</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=C%2B%2B11&action=edit&section=36" title="Modifier le code source de la section : Liens externes"><span>modifier le code</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/">Le Comité du Standard C++</a></li> <li><a rel="nofollow" class="external text" href="http://www.research.att.com/~bs/">Page personnelle de Bjarne Stroustrup</a></li> <li><a rel="nofollow" class="external text" href="http://www2.research.att.com/~bs/C++0xFAQ.html">La FAQ de C++0x, par Bjarne Stroustrup</a></li> <li><a rel="nofollow" class="external text" href="http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=216&rl=1">C++0x : Le nouveau visage du Standard C++</a></li> <li><a rel="nofollow" class="external text" href="http://www.pvv.org/~oma/cpp0x_aquadi_nov_2007.pdf">Introduction rapide au C++0x (novembre 2007)</a></li></ul> <div class="navbox-container" style="clear:both;"> <table class="navbox collapsible noprint autocollapse" style=""> <tbody><tr><th class="navbox-title" colspan="3" style=""><div style="float:left; width:6em; text-align:left"><div class="noprint plainlinks nowrap tnavbar" style="padding:0; font-size:xx-small; color:var(--color-emphasized, #000000);"><a href="/wiki/Mod%C3%A8le:Palette_C%2B%2B" title="Modèle:Palette C++"><abbr class="abbr" title="Voir ce modèle.">v</abbr></a> · <a class="external text" href="https://fr.wikipedia.org/w/index.php?title=Mod%C3%A8le:Palette_C%2B%2B&action=edit"><abbr class="abbr" title="Modifier ce modèle. Merci de prévisualiser avant de sauvegarder.">m</abbr></a></div></div><div style="font-size:110%"><a href="/wiki/C%2B%2B" title="C++">C++</a></div></th> </tr> <tr> <th class="navbox-group" style="width:70px">Normes</th> <td class="navbox-list" style=""><div class="liste-horizontale"> <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" class="mw-redirect" 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="/w/index.php?title=C%2B%2B26&action=edit&redlink=1" class="new" title="C++26 (page inexistante)">C++26</a></li></ul> </div></td> <td class="navbox-image" rowspan="4" style="vertical-align:middle;padding-left:7px"><span typeof="mw:File"><a href="/wiki/Fichier:ISO_C%2B%2B_Logo.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/1/18/ISO_C%2B%2B_Logo.svg/75px-ISO_C%2B%2B_Logo.svg.png" decoding="async" width="75" height="84" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/1/18/ISO_C%2B%2B_Logo.svg/113px-ISO_C%2B%2B_Logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/1/18/ISO_C%2B%2B_Logo.svg/150px-ISO_C%2B%2B_Logo.svg.png 2x" data-file-width="306" data-file-height="344" /></a></span></td> </tr> <tr> <th class="navbox-group" style="width:70px"><a href="/wiki/Compilateur" title="Compilateur">Compilateurs</a></th> <td class="navbox-list navbox-even" style=""><div class="liste-horizontale"> <ul><li><a href="/wiki/Clang" title="Clang">Clang</a></li> <li><a href="/wiki/GNU_Compiler_Collection" title="GNU Compiler Collection">GNU Compiler Collection</a></li> <li><a href="/wiki/Intel_C%2B%2B_Compiler" title="Intel C++ Compiler">Intel C++ Compiler</a></li> <li><a href="/wiki/Visual_C%2B%2B" title="Visual C++">Visual C++</a></li></ul> </div></td> </tr> <tr> <th class="navbox-group" style="width:70px"><a href="/wiki/Environnement_de_d%C3%A9veloppement" title="Environnement de développement">IDEs</a></th> <td class="navbox-list" style=""><div class="liste-horizontale"> <ul><li><a href="/wiki/C%2B%2BBuilder" title="C++Builder">C++Builder</a></li> <li><a href="/wiki/CLion_(logiciel)" title="CLion (logiciel)">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_(projet)" title="Eclipse (projet)">Eclipse</a></li> <li><a href="/wiki/KDevelop" title="KDevelop">KDevelop</a></li> <li><a href="/wiki/Microsoft_Visual_Studio" title="Microsoft Visual Studio">Microsoft Visual Studio</a></li> <li><a href="/wiki/NetBeans" title="NetBeans">NetBeans</a></li> <li><a href="/wiki/Qt_Creator" title="Qt Creator">Qt Creator</a></li></ul> </div></td> </tr> <tr> <th class="navbox-group" style="width:70px"><a href="/wiki/Biblioth%C3%A8que_logicielle" title="Bibliothèque logicielle">Bibliothèques</a></th> <td class="navbox-list navbox-even" style=""><div class="liste-horizontale"> <ul><li><a href="/wiki/Biblioth%C3%A8que_standard_du_C%2B%2B" title="Bibliothèque standard du C++">Bibliothèque standard du C++</a></li> <li><a href="/wiki/Boost_(biblioth%C3%A8ques)" title="Boost (bibliothèques)">Boost</a></li> <li><a href="/wiki/Standard_Template_Library" title="Standard Template Library">Standard Template Library</a></li></ul> </div></td> </tr> </tbody></table> </div> <ul id="bandeau-portail" class="bandeau-portail"><li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"><a href="/wiki/Portail:Programmation_informatique" title="Portail de la programmation informatique"><img alt="icône décorative" src="//upload.wikimedia.org/wikipedia/commons/thumb/c/cc/Circle-icons-dev.svg/24px-Circle-icons-dev.svg.png" decoding="async" width="24" height="24" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/c/cc/Circle-icons-dev.svg/36px-Circle-icons-dev.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/c/cc/Circle-icons-dev.svg/48px-Circle-icons-dev.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></span> <span class="bandeau-portail-texte"><a href="/wiki/Portail:Programmation_informatique" title="Portail:Programmation informatique">Portail de la programmation informatique</a></span> </span></li> </ul> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐864bbfd546‐xqf2v Cached time: 20241129225930 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] CPU time usage: 0.607 seconds Real time usage: 4.733 seconds Preprocessor visited node count: 6560/1000000 Post‐expand include size: 77624/2097152 bytes Template argument size: 9742/2097152 bytes Highest expansion depth: 14/100 Expensive parser function count: 218/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 114968/5000000 bytes Lua time usage: 0.138/10.000 seconds Lua memory usage: 6275360/52428800 bytes Number of Wikibase entities loaded: 1/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 4466.258 1 -total 55.86% 2494.731 181 Modèle:Code 2.91% 129.866 1 Modèle:Infobox_Langage_de_programmation 2.55% 113.793 2 Modèle:Références 1.93% 86.172 21 Modèle:Lien_web 1.71% 76.224 14 Modèle:Wikidata 1.22% 54.572 1 Modèle:Notes 1.02% 45.521 21 Modèle:Infobox/Ligne_mixte_optionnelle 0.79% 35.344 2 Modèle:Infobox/Image_optionnelle 0.62% 27.488 1 Modèle:Infobox/Titre --> <!-- Saved in parser cache with key frwiki:pcache:2482644:|#|:idhash:canonical and timestamp 20241129225930 and revision id 219007527. 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&useformat=desktop" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Ce document provient de « <a dir="ltr" href="https://fr.wikipedia.org/w/index.php?title=C%2B%2B11&oldid=219007527">https://fr.wikipedia.org/w/index.php?title=C%2B%2B11&oldid=219007527</a> ».</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Cat%C3%A9gorie:Accueil" title="Catégorie:Accueil">Catégories</a> : <ul><li><a href="/wiki/Cat%C3%A9gorie:Langage_de_programmation" title="Catégorie:Langage de programmation">Langage de programmation</a></li><li><a href="/wiki/Cat%C3%A9gorie:Langage_orient%C3%A9_objet" title="Catégorie:Langage orienté objet">Langage orienté objet</a></li><li><a href="/wiki/Cat%C3%A9gorie:Norme_ISO" title="Catégorie:Norme ISO">Norme ISO</a></li><li><a href="/wiki/Cat%C3%A9gorie:C%2B%2B" title="Catégorie:C++">C++</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Catégories cachées : <ul><li><a href="/wiki/Cat%C3%A9gorie:Page_utilisant_P571" title="Catégorie:Page utilisant P571">Page utilisant P571</a></li><li><a href="/wiki/Cat%C3%A9gorie:Page_utilisant_des_donn%C3%A9es_de_Wikidata_%C3%A0_traduire_de_l%27anglais" title="Catégorie:Page utilisant des données de Wikidata à traduire de l'anglais">Page utilisant des données de Wikidata à traduire de l'anglais</a></li><li><a href="/wiki/Cat%C3%A9gorie:Page_utilisant_P737" title="Catégorie:Page utilisant P737">Page utilisant P737</a></li><li><a href="/wiki/Cat%C3%A9gorie:Page_utilisant_P856" title="Catégorie:Page utilisant P856">Page utilisant P856</a></li><li><a href="/wiki/Cat%C3%A9gorie:Article_utilisant_une_Infobox" title="Catégorie:Article utilisant une Infobox">Article utilisant une Infobox</a></li><li><a href="/wiki/Cat%C3%A9gorie:Article_contenant_un_appel_%C3%A0_traduction_en_anglais" title="Catégorie:Article contenant un appel à traduction en anglais">Article contenant un appel à traduction en anglais</a></li><li><a href="/wiki/Cat%C3%A9gorie:Article_%C3%A0_r%C3%A9f%C3%A9rence_n%C3%A9cessaire" title="Catégorie:Article à référence nécessaire">Article à référence nécessaire</a></li><li><a href="/wiki/Cat%C3%A9gorie:Portail:Programmation_informatique/Articles_li%C3%A9s" title="Catégorie:Portail:Programmation informatique/Articles liés">Portail:Programmation informatique/Articles liés</a></li><li><a href="/wiki/Cat%C3%A9gorie:Portail:Informatique/Articles_li%C3%A9s" title="Catégorie:Portail:Informatique/Articles liés">Portail:Informatique/Articles liés</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"> La dernière modification de cette page a été faite le 28 septembre 2024 à 20:50.</li> <li id="footer-info-copyright"><span style="white-space: normal"><a href="/wiki/Wikip%C3%A9dia:Citation_et_r%C3%A9utilisation_du_contenu_de_Wikip%C3%A9dia" title="Wikipédia:Citation et réutilisation du contenu de Wikipédia">Droit d'auteur</a> : les textes sont disponibles sous <a rel="nofollow" class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.fr">licence Creative Commons attribution, partage dans les mêmes conditions</a> ; d’autres conditions peuvent s’appliquer. Voyez les <a class="external text" href="https://foundation.wikimedia.org/wiki/Policy:Terms_of_Use/fr">conditions d’utilisation</a> pour plus de détails, ainsi que les <a href="/wiki/Wikip%C3%A9dia:Cr%C3%A9dits_graphiques" title="Wikipédia:Crédits graphiques">crédits graphiques</a>. En cas de réutilisation des textes de cette page, voyez <a href="/wiki/Sp%C3%A9cial:Citer/C%2B%2B11" title="Spécial:Citer/C++11">comment citer les auteurs et mentionner la licence</a>.<br /> Wikipedia® est une marque déposée de la <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, organisation de bienfaisance régie par le paragraphe <a href="/wiki/501c" title="501c">501(c)(3)</a> du code fiscal des États-Unis.</span><br /></li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy/fr">Politique de confidentialité</a></li> <li id="footer-places-about"><a href="/wiki/Wikip%C3%A9dia:%C3%80_propos_de_Wikip%C3%A9dia">À propos de Wikipédia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikip%C3%A9dia:Avertissements_g%C3%A9n%C3%A9raux">Avertissements</a></li> <li id="footer-places-contact"><a href="//fr.wikipedia.org/wiki/Wikipédia:Contact">Contact</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code de conduite</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Développeurs</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/fr.wikipedia.org">Statistiques</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Déclaration sur les témoins (cookies)</a></li> <li id="footer-places-mobileview"><a href="//fr.m.wikipedia.org/w/index.php?title=C%2B%2B11&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Version mobile</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-5c59558b9d-2p7sq","wgBackendResponseTime":148,"wgPageParseReport":{"limitreport":{"cputime":"0.607","walltime":"4.733","ppvisitednodes":{"value":6560,"limit":1000000},"postexpandincludesize":{"value":77624,"limit":2097152},"templateargumentsize":{"value":9742,"limit":2097152},"expansiondepth":{"value":14,"limit":100},"expensivefunctioncount":{"value":218,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":114968,"limit":5000000},"entityaccesscount":{"value":1,"limit":400},"timingprofile":["100.00% 4466.258 1 -total"," 55.86% 2494.731 181 Modèle:Code"," 2.91% 129.866 1 Modèle:Infobox_Langage_de_programmation"," 2.55% 113.793 2 Modèle:Références"," 1.93% 86.172 21 Modèle:Lien_web"," 1.71% 76.224 14 Modèle:Wikidata"," 1.22% 54.572 1 Modèle:Notes"," 1.02% 45.521 21 Modèle:Infobox/Ligne_mixte_optionnelle"," 0.79% 35.344 2 Modèle:Infobox/Image_optionnelle"," 0.62% 27.488 1 Modèle:Infobox/Titre"]},"scribunto":{"limitreport-timeusage":{"value":"0.138","limit":"10.000"},"limitreport-memusage":{"value":6275360,"limit":52428800}},"cachereport":{"origin":"mw-web.eqiad.main-864bbfd546-xqf2v","timestamp":"20241129225930","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"C++11","url":"https:\/\/fr.wikipedia.org\/wiki\/C%2B%2B11","sameAs":"http:\/\/www.wikidata.org\/entity\/Q1061570","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q1061570","author":{"@type":"Organization","name":"Contributeurs aux projets Wikimedia"},"publisher":{"@type":"Organization","name":"Fondation Wikimedia, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2007-12-10T00:05:51Z","dateModified":"2024-09-28T19:50:59Z","headline":"langage de programmation informatique"}</script> </body> </html>