C++ 20 – הבדלי גרסאות
תוכן שנמחק תוכן שנוסף
Wikiped201820 (שיחה | תרומות) אין תקציר עריכה תגיות: עריכה ממכשיר נייד עריכה דרך האתר הנייד |
|||
שורה 1: | שורה 1: | ||
{{שפת תכנות |
{{שפת תכנות}} |
||
⚫ | '''C++ 20''' הוא שמו של תקן [[ארגון התקינה הבינלאומי|ISO]]/IEC עבור שפת התכנות [[C++|++C]]{{הערה|ISO/IEC 14882:2020}} (תקן עוקב ל C++ 17).<ref>{{Cite web|title=The Standard|url=https://isocpp.org/std/the-standard|website=isocpp.org|accessdate=7 September 2020}}</ref> התקן נחתם טכנית<ref>{{Cite web|url=http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1000r3.pdf|title=P1000R3: C++ IS schedule|last=Sutter|first=Herb|date=2019-10-01|website=|accessdate=2020-02-13}}</ref> ידי WG21 בפגישה בפראג בפברואר 2020,<ref>{{Cite web|url=http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/n4817.pdf|title=N4817: 2020 Prague Meeting Invitation and Information|last=Dusíková|first=Hana|date=2019-11-06|website=|archiveurl=|archivedate=|accessdate=2020-02-13}}</ref> אושר ב-4 בספטמבר 2020,<ref>{{Cite web|title=Current Status|url=https://isocpp.org/std/status|website=isocpp.org|accessdate=7 September 2020}}</ref><ref>{{Cite web|title=C++20 Approved -- Herb Sutter|url=https://isocpp.org/blog/2020/09/cpp20-approved-herb-sutter|website=isocpp.org|accessdate=8 September 2020}}</ref> ופורסם על ידי ISO בדצמבר 2020.<ref>{{Cite web|url=https://www.iso.org/standard/79358.html|title=ISO/IEC 14882:2020}}</ref> |
||
}} |
|||
⚫ | '''C++ 20''' הוא שמו של תקן [[ארגון התקינה הבינלאומי|ISO]]/IEC עבור שפת התכנות [[C++|++C]]{{הערה|ISO/IEC 14882:2020}} (תקן עוקב ל C++ 17).<ref>{{Cite web|title=The Standard|url=https://isocpp.org/std/the-standard|website=isocpp.org|accessdate=7 September 2020}}</ref> התקן נחתם טכנית |
||
== היסטוריה == |
== היסטוריה == |
||
שורה 7: | שורה 6: | ||
השינויים שהוחלו על טיוטת העבודה של C++ 20 שגובשה ביולי 2017 בטורונטו כוללים:<ref> |
השינויים שהוחלו על טיוטת העבודה של C++ 20 שגובשה ביולי 2017 בטורונטו כוללים:<ref> |
||
{{Cite web|url=https://herbsutter.com/2017/07/15/trip-report-summer-iso-c-standards-meeting-toronto/|title=Trip report: Summer ISO C++ standards meeting (Toronto)|last=[[Herb Sutter]]}}</ref> |
{{Cite web|url=https://herbsutter.com/2017/07/15/trip-report-summer-iso-c-standards-meeting-toronto/|title=Trip report: Summer ISO C++ standards meeting (Toronto)|last=[[Herb Sutter]]}}</ref> |
||
* concepts (מה שהפך אותו לתקן הוא גרסה מקוצרת; מתוארת גם כ"Concepts Lite"<ref>{{Cite web|title=Concepts Lite: Constraining Templates with Predicates|url=https://isocpp.org/blog/2013/02/concepts-lite-constraining-templates-with-predicates-andrew-sutton-bjarne-s|website=isocpp.org|date=2013-02-24|publisher=isocpp.org|last=Andrew Sutton|last2=Bjarne Stroustrup|accessdate=2021-01-13}}</ref> |
* concepts (מה שהפך אותו לתקן הוא גרסה מקוצרת; מתוארת גם כ"Concepts Lite")<ref>{{Cite web|title=Concepts Lite: Constraining Templates with Predicates|url=https://isocpp.org/blog/2013/02/concepts-lite-constraining-templates-with-predicates-andrew-sutton-bjarne-s|website=isocpp.org|date=2013-02-24|publisher=isocpp.org|last=Andrew Sutton|last2=Bjarne Stroustrup|accessdate=2021-01-13}}</ref> |
||
* designated initializers |
* designated initializers |
||
* <code>[=, this]</code> כ- lambda capture |
* <code>[=, this]</code> כ- lambda capture |
גרסה מ־20:33, 7 במרץ 2021
תאריך השקה | 2020 |
---|---|
האתר הרשמי | |
C++ 20 הוא שמו של תקן ISO/IEC עבור שפת התכנות ++C[1] (תקן עוקב ל C++ 17).[2] התקן נחתם טכנית[3] ידי WG21 בפגישה בפראג בפברואר 2020,[4] אושר ב-4 בספטמבר 2020,[5][6] ופורסם על ידי ISO בדצמבר 2020.[7]
היסטוריה
שגיאות פרמטריות בתבנית:להשלים
פרמטרי חובה [ נושא ] חסרים
פרק זה לוקה בחסר. אנא תרמו לוויקיפדיה והשלימו אותו.
השינויים שהוחלו על טיוטת העבודה של C++ 20 שגובשה ביולי 2017 בטורונטו כוללים:[8]
- concepts (מה שהפך אותו לתקן הוא גרסה מקוצרת; מתוארת גם כ"Concepts Lite")[9]
- designated initializers
[=, this]
כ- lambda capture- רשימות פרמטרים של על lambda
std::make_shared
ו-std::allocate_shared
למערכים
השינויים שהוחלו על טיוטת העבודה C++ 20 בישיבת הסתיו בנובמבר 2017 באלבוקרקי כוללים:[10][11]
- השוואות three-way עם ה-"spaceship operator":
operator < = >
- אתחול של משתנה נוסף בטווח של הצהרת
for
- למבדות בהקשרים לא משוערכים
- למבדות דיפולטיות חסרות מצב (stateless)
- אפשר הרחבות בלמבדה init-capture
- מצביעים חכמים אטומיים, כגון
std::atomic<shared_ptr<T>>
ו-std::atomic<weak_ptr<T>>
std::to_address
להמיר pointer ל raw pointer
הערות שוליים
- ^ ISO/IEC 14882:2020
- ^ "The Standard". isocpp.org. נבדק ב-7 בספטמבר 2020.
{{cite web}}
: (עזרה) - ^ Sutter, Herb (2019-10-01). "P1000R3: C++ IS schedule" (PDF). נבדק ב-2020-02-13.
- ^ Dusíková, Hana (2019-11-06). "N4817: 2020 Prague Meeting Invitation and Information" (PDF). נבדק ב-2020-02-13.
- ^ "Current Status". isocpp.org. נבדק ב-7 בספטמבר 2020.
{{cite web}}
: (עזרה) - ^ "C++20 Approved -- Herb Sutter". isocpp.org. נבדק ב-8 בספטמבר 2020.
{{cite web}}
: (עזרה) - ^ "ISO/IEC 14882:2020".
- ^ Herb Sutter. "Trip report: Summer ISO C++ standards meeting (Toronto)".
- ^ Andrew Sutton; Bjarne Stroustrup (2013-02-24). "Concepts Lite: Constraining Templates with Predicates". isocpp.org. isocpp.org. נבדק ב-2021-01-13.
- ^ Herb Sutter. "Trip report: Fall ISO C++ standards meeting (Albuquerque)".
- ^ Smith, Richard; Perchik, Dawn; Köppe, Thomas. "N4714 Editors' Report -- Programming Languages -- C++". C++ standards drafts. GitHub. נבדק ב-27 בדצמבר 2018.
{{cite web}}
: (עזרה)