Variants
Actions

Difference between revisions of "Cppreference:FAQ"

From cppreference.com
(C++23 -> n4901)
m (update links)
 
(22 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
{{title|Frequently asked questions}}
 
{{title|Frequently asked questions}}
 
{{cpp/navbar}}
 
{{cpp/navbar}}
 +
 
===What is the purpose of this site?===
 
===What is the purpose of this site?===
 
+
Our goal is to provide programmers with a complete online reference for the C and C++ languages and standard libraries, i.e. a more convenient version of the C and C++ standards.
Our goal is to provide programmers with a complete online reference for the C and C++ languages and standard libraries, i.e. a more convenient version of the C and C++ standards.  
+
  
 
The primary objective is to have a good ''specification'' of C and C++. That is, things that are implicitly clear to an experienced programmer should be omitted, or at least separated from the main description of a function, constant or class. A good place to demonstrate various use cases is the "example" section of each page. Rationale, implementation notes, domain specific documentation are preferred to be included in the "notes" section of each page.
 
The primary objective is to have a good ''specification'' of C and C++. That is, things that are implicitly clear to an experienced programmer should be omitted, or at least separated from the main description of a function, constant or class. A good place to demonstrate various use cases is the "example" section of each page. Rationale, implementation notes, domain specific documentation are preferred to be included in the "notes" section of each page.
  
 
===Why is the material here limited to the standard C and C++?===
 
===Why is the material here limited to the standard C and C++?===
 
+
In short, we chose quality over quantity. Some [https://www.boost.org Boost libraries] could also be candidates for inclusion though. While their tutorials are very good, the ''reference'' documentation is often very inflexible and inconvenient.
In short, we chose quality over quantity. Some [http://www.boost.org Boost libraries] could also be candidates for inclusion though. While their tutorials are very good, the ''reference'' documentation is often very inflexible and inconvenient.
+
  
 
===Where can I find more information?===
 
===Where can I find more information?===
 
+
Check out the following collections of links [[c/links|[1]<nowiki/>]] [[cpp/links|[2]<nowiki/>]] for alternative links and material that falls outside of the scope of this site.
Check out the following collections of links [[c/links|<nowiki>[1]</nowiki>]] [[cpp/links|<nowiki>[2]</nowiki>]] for alternative links and material that falls outside of the scope of this site.
+
  
 
===Which revision of the C Standard does this reference adhere to?===
 
===Which revision of the C Standard does this reference adhere to?===
 +
C23 is the most recently published C Standard (and C2y is on the way), so it is the main focus of the [[c|C reference]].
  
C17 is the most recently published C Standard, so it is the main focus of the [[c|C reference]].
+
However, in order to provide a more complete reference, we also include documentation describing previous versions of the standard (C89, C95, C99, C11, C17), drafts for future versions of the standard, and the [[c/experimental|Technical Specifications]]. All version-specific documentation should be labeled appropriately.
 
+
However, in order to provide a more complete reference, we also include documentation describing previous versions of the standard (C89, C95, C99, C11), drafts for future versions of the standard, and the [[c/experimental|Technical Specifications]]. All version-specific documentation should be labeled appropriately.  
+
  
 
The various C standard revisions can be found at:
 
The various C standard revisions can be found at:
 +
* C{{stdinfo next version number|lang=c}}
 +
** The latest free working draft is {{stddoc latest draft|{{stdinfo latest draft docnum|lang=c}}|lang=c}} ({{stdinfo latest draft docdate|lang=c}}).
 +
 
* C23
 
* C23
** The latest free working draft is [http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2731.pdf n2731] (2021-10-18)
+
** The official C23 Standard can be [https://www.iso.org/standard/82075.html purchased from ISO].
 +
** The draft {{stddoc|n3220|lang=c}} (2024-02-22) is equivalent to C23 except for editorial fixes.
  
 
* C17
 
* C17
** The official C17 Standard can be [https://www.iso.org/standard/74528.html?browse=tc purchased from ISO]<!-- Pending confirmation that it is the same document:  , or (at a discount) [https://webstore.ansi.org/RecordDetail.aspx?sku=INCITS%2fISO%2fIEC+9899%3a2011+(R2017) from ANSI] and other member organizations.-->
+
** The C17 standard was withdrawn and is [https://www.iso.org/standard/74528.html no longer available from ISO], although it may still be [https://webstore.ansi.org/standards/incits/incitsisoiec989920182019 purchased from ANSI].
** The final draft standard [https://files.lhmouse.com/standards/ISO%20C%20N2176.pdf C17 FDIS] is available for free
+
** The final draft standard [https://files.lhmouse.com/standards/ISO%20C%20N2176.pdf C17 FDIS] is available for free.
  
 
* C11
 
* C11
** The C11 standard was withdrawn and is [https://www.iso.org/standard/57853.html no longer available from ISO], although it may still be [http://webstore.ansi.org/RecordDetail.aspx?sku=INCITS%2FISO%2FIEC+9899-2012 purchased from ANSI].
+
** The C11 standard was withdrawn and is [https://www.iso.org/standard/57853.html no longer available from ISO], although it may still be [https://webstore.ansi.org/standards/incits/incitsisoiec98992012 purchased from ANSI].
** A C11 working draft [http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf n1570 (2011-04-12)] is available for free and differs only minimally from the final C11 Standard.
+
** A C11 working draft {{stddoc|n1570|lang=c}} (2011-04-12) is available for free and differs only minimally from the final C11 Standard.
  
 
* C99
 
* C99
** The C99 standard was withdrawn and is [http://www.iso.org/iso/iso_catalogue/catalogue_ics/catalogue_detail_ics.htm?csnumber=29237 no longer available from ISO], although it may still be [http://webstore.ansi.org/RecordDetail.aspx?sku=INCITS%2fISO%2fIEC+9899-1999+(R2005) purchased from ANSI].
+
** The C99 standard was withdrawn and is [https://www.iso.org/standard/29237.html no longer available from ISO], although it may still be [https://webstore.ansi.org/standards/incits/incitsisoiec98991999r2005 purchased from ANSI].
** The final C99:TC3 working draft [http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf  n1256 (2007-09-07)] is freely available and differs only minimally from the final C99 standard including all three Technical Corrigenda.
+
** The final C99:TC3 working draft {{stddoc|n1256|lang=c}} (2007-09-07) is freely available and differs only minimally from the final C99 standard including all three Technical Corrigenda.
  
 
* C95
 
* C95
** The C90 amendment AMD1, which transforms C90 to C95 is no longer available from official sources, although it may be found with some document retailers, such as [https://global.ihs.com/doc_detail.cfm?item_s_key=00120900&item_key_date=040830&input_doc_number=9899&input_doc_title=&origin=HISC Global Engineering Documents]
+
** The C90 amendment AMD1 was withdrawn and is [https://www.iso.org/standard/23909.html no longer available from ISO], although it may still be [https://www.intertekinform.com/en-us/standards/iso-iec-9899-1990-amd-1-1995-592351_saig_iso_iso_1411932/ purchased from Intertek Inform].
  
 
* C89/C90
 
* C89/C90
** The C90 standard was withdrawn and is no longer available from official sources, although it may be found with some document retailers, such as [http://infostore.saiglobal.com/store/Details.aspx?ProductID=306911 SAI-Global]
+
** The C90 standard was withdrawn and is [https://www.iso.org/standard/17782.html no longer available from ISO], although it may still be [https://www.intertekinform.com/en-us/standards/iso-iec-9899-1990-592351_saig_iso_iso_1356836/ purchased from Intertek Inform].
 
** The final draft (X3J11/90-013 (ANSI numbering) or n119 (WG14 numbering)) is not publicly available, but the final public review draft [https://web.archive.org/web/20170502072247/Flash-gordon.me.uk/ansi.c.txt X3J11/88-090 (1988-05-13)] is available and differs minimally from the final C89 standard.
 
** The final draft (X3J11/90-013 (ANSI numbering) or n119 (WG14 numbering)) is not publicly available, but the final public review draft [https://web.archive.org/web/20170502072247/Flash-gordon.me.uk/ansi.c.txt X3J11/88-090 (1988-05-13)] is available and differs minimally from the final C89 standard.
  
 
===Which revision of the C++ Standard does this reference adhere to?===
 
===Which revision of the C++ Standard does this reference adhere to?===
 +
C++23 is the most recently published C++ Standard (and C++26 is on the way), so that is the main focus of this site.
  
C++20 is the most recently published C++ Standard, so that is the main focus of this site. 
+
However, in order to provide a more complete reference, we also include documentation describing previous versions of the standard (C++98, C++03, C++11, C++14, C++17, C++20, and C++23) as well as draft documentation for future versions of the standard (C++26, and the [[cpp/experimental|Technical Specifications]]).  All version-specific documentation should be labeled appropriately.
 
+
However, in order to provide a more complete reference, we also include documentation describing previous versions of the standard (C++98, C++03, C++11, C++14, C++17) as well as draft documentation for future versions of the standard (C++23, and the [[cpp/experimental|Technical Specifications]]).  All version-specific documentation should be labeled appropriately.
+
  
 
The various C++ Standards themselves can be found at:
 
The various C++ Standards themselves can be found at:
* C++23
+
* C++26
** The latest free working draft is [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/n4901.pdf n4901] (2021-10-23)
+
** The latest free working draft is {{stddoc latest draft|{{stdinfo latest draft docnum}} ({{stdinfo latest draft docdate}})}}.
 
** The most up-to-date version can be found, in source form, at [https://github.com/cplusplus/draft cplusplus/draft] and in browseable form at [https://eel.is/c++draft eel.is/c++draft].
 
** The most up-to-date version can be found, in source form, at [https://github.com/cplusplus/draft cplusplus/draft] and in browseable form at [https://eel.is/c++draft eel.is/c++draft].
 +
 +
* C++23
 +
** The official C++23 standard can be [https://www.iso.org/standard/83626.html purchased directly from ISO].
 +
** The final draft of C++23 is {{stddoc|n4950}} (2023-05-10).
  
 
* C++20
 
* C++20
** The official C++20 standard can be [https://www.iso.org/standard/79358.html purchased directly from ISO]
+
** The C++20 standard was withdrawn and is [https://www.iso.org/standard/79358.html no longer available from ISO]. It can still be purchased from member organizations such as [https://webstore.ansi.org/standards/incits/incitsisoiec1488220202021 ANSI].
** The final draft of C++20 is [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/n4861.pdf n4861 (2020-03-31)].
+
** The final draft of C++20 is {{stddoc|n4860}} (2020-03-31).
** A post-C++20 working draft [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/n4868.pdf n4868 (2020-10-18)] is available, which only contains [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/n4867.html editorial fixes] since C++20.
+
** A post-C++20 working draft {{stddoc|n4868}} (2020-10-18) is available, which only contains {{stddoc|n4867}} editorial fixes since C++20.
  
 
* C++17
 
* C++17
 
** The C++17 standard was withdrawn and is [https://www.iso.org/standard/68564.html no longer available from ISO]. It can still be purchased from member organizations such as [https://webstore.ansi.org/Standards/INCITS/INCITSISOIEC1488220172018 ANSI].
 
** The C++17 standard was withdrawn and is [https://www.iso.org/standard/68564.html no longer available from ISO]. It can still be purchased from member organizations such as [https://webstore.ansi.org/Standards/INCITS/INCITSISOIEC1488220172018 ANSI].
** The final draft of C++17 is [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4659.pdf n4659 (2017-03-21)].
+
** The final draft of C++17 is {{stddoc|n4659}} (2017-03-21).
  
 
* C++14
 
* C++14
 
** The C++14 standard was withdrawn and is [https://www.iso.org/standard/64029.html no longer available from ISO]. It can still be purchased [https://webstore.ansi.org/Standards/INCITS/INCITSISOIEC1488220142016 through ANSI] and other member organizations
 
** The C++14 standard was withdrawn and is [https://www.iso.org/standard/64029.html no longer available from ISO]. It can still be purchased [https://webstore.ansi.org/Standards/INCITS/INCITSISOIEC1488220142016 through ANSI] and other member organizations
** A free [https://github.com/cplusplus/draft/blob/master/papers/n4140.pdf?raw=true C++14 final draft] (n4140) is available as well as [https://github.com/cplusplus/draft/compare/n4140...n4141 the diff] between it and the standard (n4141) which consists mainly of typo fixes and version number changes. <!-- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4139.html states that n4141 is the international standard -->
+
** A free [https://github.com/cplusplus/draft/blob/master/papers/n4140.pdf?raw=true C++14 final draft] (n4140) is available as well as [https://github.com/cplusplus/draft/compare/n4140...n4141 the diff] between it and the standard (n4141) which consists mainly of typo fixes and version number changes. <!-- https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4139.html states that n4141 is the international standard -->
* C++11  
+
 
 +
* C++11
 
** The C++11 standard was withdrawn and is [https://www.iso.org/standard/50372.html no longer available from ISO].
 
** The C++11 standard was withdrawn and is [https://www.iso.org/standard/50372.html no longer available from ISO].
** A free [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf C++11 Working Draft] (n3337) is available. (The [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3338.html differences] between the Working Draft and the C++11 Standard are minor.)
+
** A free C++11 Working Draft {{stddoc|n3337}} is available. (The differences {{stddoc|n3338}} between the Working Draft and the C++11 Standard are minor.)
 +
 
 
* C++03
 
* C++03
 
** The C++03 standard was withdrawn and is [https://www.iso.org/standard/38110.html no longer available from ISO].
 
** The C++03 standard was withdrawn and is [https://www.iso.org/standard/38110.html no longer available from ISO].
 +
 
* C++98
 
* C++98
 
** The C++98 standard was withdrawn and is [https://www.iso.org/standard/25845.html no longer available from ISO].
 
** The C++98 standard was withdrawn and is [https://www.iso.org/standard/25845.html no longer available from ISO].
  
 
===Why are there differences between the standard and cppreference?===
 
===Why are there differences between the standard and cppreference?===
Cppreference is maintained by and aims to be useful to programmers, not ISO historians, and as programmers, we care what we get when we use {{tt|-std{{=}}c++20}}, or whatever your compiler's equivalent flag is. As a result, our documentation is for a hypothetical complete and correct implementation of each C and C++ standard revision plus all subsequent bugfixes and clarifications applicable to that revision. When available, we use the standards committee guidance and the current implementations as evidence for what such a hypothetical implementation would do.
+
Cppreference is maintained by and aims to be useful to programmers, not ISO historians, and as programmers, we care what we get when we use {{tt|1=-std=c++20}}, or whatever your compiler's equivalent flag is. As a result, our documentation is for a hypothetical complete and correct implementation of each C and C++ standard revision plus all subsequent bugfixes and clarifications applicable to that revision. When available, we use the standards committee guidance and the current implementations as evidence for what such a hypothetical implementation would do.
  
==={{anchor|offline}}Do you have a version of this site suitable for offline viewing?===
+
{{anchor|offline}}
 
+
===Do you have a version of this site suitable for offline viewing?===
Sure, you can grab one [[Cppreference:Archives | here]].
+
Sure, you can grab one [[Cppreference:Archives|here]].
  
 
Some apps also offer off-line viewing of this site's content. For example the docset-based apps: [https://kapeli.com/dash Dash] for Mac and iOS, [https://velocity.silverlakesoftware.com Velocity] for Windows, [https://zealdocs.org Zeal] for Linux, and [https://apkpure.com/lovelydocs/com.lovelyhq.android.lovelydocs LovelyDocs] for Android.
 
Some apps also offer off-line viewing of this site's content. For example the docset-based apps: [https://kapeli.com/dash Dash] for Mac and iOS, [https://velocity.silverlakesoftware.com Velocity] for Windows, [https://zealdocs.org Zeal] for Linux, and [https://apkpure.com/lovelydocs/com.lovelyhq.android.lovelydocs LovelyDocs] for Android.
  
 
===Can you make the site easier to view?===
 
===Can you make the site easier to view?===
 
 
You might find a [https://userstyles.org/styles/127535/cpp-reference-dark a dark theme] more legible than the default bright theme. Or you could try a browser extension such as [https://darkreader.org DarkReader].
 
You might find a [https://userstyles.org/styles/127535/cpp-reference-dark a dark theme] more legible than the default bright theme. Or you could try a browser extension such as [https://darkreader.org DarkReader].
  
Line 91: Line 97:
  
 
===What can I do with the material on this site?===
 
===What can I do with the material on this site?===
 
+
The content is licensed under [[Cppreference:Copyright/CC-BY-SA|Creative Commons Attribution-Sharealike 3.0 Unported License]] (CC-BY-SA) and by the [[Cppreference:Copyright/GDFL|GNU Free Documentation License]] (GFDL) (unversioned, with no invariant sections, front-cover texts, or back-cover texts). That means that you can use this site in almost any way you like, including mirroring, copying, translating, etc. All we would ask is to provide link back to {{tt|cppreference.com}} so that people know where to get the most up-to-date content. In addition to that, any modified content should be released under an equivalent license so that everyone could benefit from the modified versions.
The content is licensed under [[Cppreference:Copyright/CC-BY-SA | Creative Commons Attribution-Sharealike 3.0 Unported License]] (CC-BY-SA) and by the [[Cppreference:Copyright/GDFL | GNU Free Documentation License]] (GFDL) (unversioned, with no invariant sections, front-cover texts, or back-cover texts). That means that you can use this site in almost any way you like, including mirroring, copying, translating, etc. All we would ask is to provide link back to {{tt|cppreference.com}} so that people know where to get the most up-to-date content. In addition to that, any modified content should be released under an equivalent license so that everyone could benefit from the modified versions.
+
  
 
===What? This is a wiki? Can I change stuff?===
 
===What? This is a wiki? Can I change stuff?===
 
 
Absolutely. If you see something that is wrong, fix it. However, currently the wiki is limited to standard C and C++, so you should not add non-standard content like compiler-specific extensions. Also, please double check any changes with the appropriate standard. If you are unsure about anything, you can ask about it in the discussion pages.
 
Absolutely. If you see something that is wrong, fix it. However, currently the wiki is limited to standard C and C++, so you should not add non-standard content like compiler-specific extensions. Also, please double check any changes with the appropriate standard. If you are unsure about anything, you can ask about it in the discussion pages.
  
===How can I edit? What are the syntax rules?===
+
Note that due to recent vandalism, editing of most pages is restricted to confirmed users. If you don't have a confirmed account, you can instead suggest a change on [[Talk:Main_Page/suggestions]], or [[#How can I contact you?|contact]] the admin.
  
This wiki uses Mediawiki, the same wiki system as the [http://www.wikipedia.org Wikipedia project]. You can use their help pages to introduce you to the Mediawiki wikicode syntax. However, most of the content in this wiki is wrapped in quite complex templates. They do most of the formatting and help to aggregate the repetitive stuff in one place, so when something is to be modified, there is no need to make the same modification tens or hundreds of times. For help about the templates used in this wiki, see [[Help:Templates]].  
+
===How can I edit? What are the syntax rules?===
 +
This wiki uses [https://www.mediawiki.org/wiki/MediaWiki MediaWiki], the same wiki system as the [https://www.wikipedia.org Wikipedia project]. You can use their help pages to introduce you to the MediaWiki wikicode syntax. However, most of the content in this wiki is wrapped in quite complex templates. They do most of the formatting and help to aggregate the repetitive stuff in one place, so when something is to be modified, there is no need to make the same modification tens or hundreds of times. For help about the templates used in this wiki, see [[Help:Templates]].
  
 
The wiki aims to have consistent style. Please see [[Help:Manual of style]] for a style guide that helps to follow consistent style and formatting in the wiki.
 
The wiki aims to have consistent style. Please see [[Help:Manual of style]] for a style guide that helps to follow consistent style and formatting in the wiki.
Line 106: Line 111:
 
For some additional editing info, see [[Cppreference:EditingHelp]].
 
For some additional editing info, see [[Cppreference:EditingHelp]].
  
Note, however, that you don't need to know neither of the complex templates, or abovementioned guidelines in order to contribute. It is much harder to write the content itself, than to apply the formatting, so don't care about the style when writing, as someone will fix that later.  
+
Note, however, that you don't need to know neither of the complex templates, or abovementioned guidelines in order to contribute. It is much harder to write the content itself, than to apply the formatting, so don't care about the style when writing, as someone will fix that later.
  
 
Some high-traffic templates are locked in order to prevent vandalism or because of performance reasons. In these cases you should request a modification in the discussion page.
 
Some high-traffic templates are locked in order to prevent vandalism or because of performance reasons. In these cases you should request a modification in the discussion page.
  
 
===I want to help.  Where should I start?===
 
===I want to help.  Where should I start?===
 
 
Great!  There are several special pages that contain suggestions for things that need to be fixed:
 
Great!  There are several special pages that contain suggestions for things that need to be fixed:
  
Line 119: Line 123:
  
 
===Who is behind this site?===
 
===Who is behind this site?===
 
+
cppreference.com was created and is maintained by a group of C++ enthusiasts from around the world.  The site has been entirely community-supported since its inception in 2000; currently hosting costs are partially offset by ads (please report any ad issues to {{tt|[email protected]}}), [https://www.cppreference.com/support/ donations, and the sale of horribly-pun-filled C++-related merchandise].
cppreference.com was created and is maintained by a group of C++ enthusiasts from around the world.  The site has been entirely community-supported since its inception in 2000; currently hosting costs are partially offset by ads (please report any ad issues to {{tt|[email protected]}}), [http://www.cppreference.com/support/ donations, and the sale of horribly-pun-filled C++-related merchandise].
+
  
 
===How can I contact you?===
 
===How can I contact you?===
 +
You can contact us at {{tt|[email protected]}}.
  
You can contact us at {{tt|[email protected]}}.
+
In case you're reporting a broken link, it might be easier to report it [[Cppreference talk:FAQ#Broken links|here]].
 
+
In case you're reporting a broken link, it might be easier to report it [[Cppreference_talk:FAQ#Broken links|here]].
+
  
{{langlinks|ja|zh}}
+
{{langlinks|ja|ru|zh}}

Latest revision as of 01:32, 8 November 2024

Contents

What is the purpose of this site?

Our goal is to provide programmers with a complete online reference for the C and C++ languages and standard libraries, i.e. a more convenient version of the C and C++ standards.

The primary objective is to have a good specification of C and C++. That is, things that are implicitly clear to an experienced programmer should be omitted, or at least separated from the main description of a function, constant or class. A good place to demonstrate various use cases is the "example" section of each page. Rationale, implementation notes, domain specific documentation are preferred to be included in the "notes" section of each page.

Why is the material here limited to the standard C and C++?

In short, we chose quality over quantity. Some Boost libraries could also be candidates for inclusion though. While their tutorials are very good, the reference documentation is often very inflexible and inconvenient.

Where can I find more information?

Check out the following collections of links [1] [2] for alternative links and material that falls outside of the scope of this site.

Which revision of the C Standard does this reference adhere to?

C23 is the most recently published C Standard (and C2y is on the way), so it is the main focus of the C reference.

However, in order to provide a more complete reference, we also include documentation describing previous versions of the standard (C89, C95, C99, C11, C17), drafts for future versions of the standard, and the Technical Specifications. All version-specific documentation should be labeled appropriately.

The various C standard revisions can be found at:

  • C2y
    • The latest free working draft is n3301 (2024-07-28).
  • C23
    • The official C23 Standard can be purchased from ISO.
    • The draft N3220 (2024-02-22) is equivalent to C23 except for editorial fixes.
  • C99
    • The C99 standard was withdrawn and is no longer available from ISO, although it may still be purchased from ANSI.
    • The final C99:TC3 working draft N1256 (2007-09-07) is freely available and differs only minimally from the final C99 standard including all three Technical Corrigenda.

Which revision of the C++ Standard does this reference adhere to?

C++23 is the most recently published C++ Standard (and C++26 is on the way), so that is the main focus of this site.

However, in order to provide a more complete reference, we also include documentation describing previous versions of the standard (C++98, C++03, C++11, C++14, C++17, C++20, and C++23) as well as draft documentation for future versions of the standard (C++26, and the Technical Specifications). All version-specific documentation should be labeled appropriately.

The various C++ Standards themselves can be found at:

  • C++20
    • The C++20 standard was withdrawn and is no longer available from ISO. It can still be purchased from member organizations such as ANSI.
    • The final draft of C++20 is N4860 (2020-03-31).
    • A post-C++20 working draft N4868 (2020-10-18) is available, which only contains N4867 editorial fixes since C++20.
  • C++17
    • The C++17 standard was withdrawn and is no longer available from ISO. It can still be purchased from member organizations such as ANSI.
    • The final draft of C++17 is N4659 (2017-03-21).
  • C++11
    • The C++11 standard was withdrawn and is no longer available from ISO.
    • A free C++11 Working Draft N3337 is available. (The differences N3338 between the Working Draft and the C++11 Standard are minor.)

Why are there differences between the standard and cppreference?

Cppreference is maintained by and aims to be useful to programmers, not ISO historians, and as programmers, we care what we get when we use -std=c++20, or whatever your compiler's equivalent flag is. As a result, our documentation is for a hypothetical complete and correct implementation of each C and C++ standard revision plus all subsequent bugfixes and clarifications applicable to that revision. When available, we use the standards committee guidance and the current implementations as evidence for what such a hypothetical implementation would do.

Do you have a version of this site suitable for offline viewing?

Sure, you can grab one here.

Some apps also offer off-line viewing of this site's content. For example the docset-based apps: Dash for Mac and iOS, Velocity for Windows, Zeal for Linux, and LovelyDocs for Android.

Can you make the site easier to view?

You might find a a dark theme more legible than the default bright theme. Or you could try a browser extension such as DarkReader.

The off-line docset-based apps noted earlier also offer dark mode and other options, but are not updated in real-time.

What can I do with the material on this site?

The content is licensed under Creative Commons Attribution-Sharealike 3.0 Unported License (CC-BY-SA) and by the GNU Free Documentation License (GFDL) (unversioned, with no invariant sections, front-cover texts, or back-cover texts). That means that you can use this site in almost any way you like, including mirroring, copying, translating, etc. All we would ask is to provide link back to cppreference.com so that people know where to get the most up-to-date content. In addition to that, any modified content should be released under an equivalent license so that everyone could benefit from the modified versions.

What? This is a wiki? Can I change stuff?

Absolutely. If you see something that is wrong, fix it. However, currently the wiki is limited to standard C and C++, so you should not add non-standard content like compiler-specific extensions. Also, please double check any changes with the appropriate standard. If you are unsure about anything, you can ask about it in the discussion pages.

Note that due to recent vandalism, editing of most pages is restricted to confirmed users. If you don't have a confirmed account, you can instead suggest a change on Talk:Main_Page/suggestions, or contact the admin.

How can I edit? What are the syntax rules?

This wiki uses MediaWiki, the same wiki system as the Wikipedia project. You can use their help pages to introduce you to the MediaWiki wikicode syntax. However, most of the content in this wiki is wrapped in quite complex templates. They do most of the formatting and help to aggregate the repetitive stuff in one place, so when something is to be modified, there is no need to make the same modification tens or hundreds of times. For help about the templates used in this wiki, see Help:Templates.

The wiki aims to have consistent style. Please see Help:Manual of style for a style guide that helps to follow consistent style and formatting in the wiki.

For some additional editing info, see Cppreference:EditingHelp.

Note, however, that you don't need to know neither of the complex templates, or abovementioned guidelines in order to contribute. It is much harder to write the content itself, than to apply the formatting, so don't care about the style when writing, as someone will fix that later.

Some high-traffic templates are locked in order to prevent vandalism or because of performance reasons. In these cases you should request a modification in the discussion page.

I want to help. Where should I start?

Great! There are several special pages that contain suggestions for things that need to be fixed:

Who is behind this site?

cppreference.com was created and is maintained by a group of C++ enthusiasts from around the world. The site has been entirely community-supported since its inception in 2000; currently hosting costs are partially offset by ads (please report any ad issues to [email protected]), donations, and the sale of horribly-pun-filled C++-related merchandise.

How can I contact you?

You can contact us at [email protected].

In case you're reporting a broken link, it might be easier to report it here.