C++20

C++20은 C++ 프로그래밍 언어를 위한 표준인 ISO/IEC의 개정판을 지칭하는 비공식적인 이름이다.[1] C++20은 C++17의 후속작이다. 표준 위원회는 C++20 계획을 2017년 7월에 시작했다.[2] 현재 기안은 N4750이다.[3]

아래는 C++20에 추가되기로 제안되었거나 논의된 항목들의 일부이다.[4]

새 기능 후보

2017년 7월에 C++20의 초안에 포함되기로 건의된 항목들:[5]

  • 콘셉트[6]
  • 지정 생성자[7] (designated initializer, C99의 기능 기반)
  • 람다 갈무리(capture)에 [=, this] 사용 가능[8]
  • 람다에서 템플릿 파라미터 리스트 사용[9]

2017년 11월에 열린 가을 회의에서 C++20에 추가하기로 건의된 항목들:[10]

  • 우주선 연산자(operator <=>)를 이용한 세갈래 비교(Three-way comparison)
  • 범위 기반 for문 안에서 추가 변수의 초기화
  • memcpy()보다 덜 장황하면서 컴파일러 내부를 활용할 수 있게 해주는 비트 단위 객체 복사(Bit-casting of object representations)
  • std::shared_ptr를 위한 std::atomic의 특수화
  • 평가되지 않은 콘텍스트에서의 람다[11][12]
  • 생성과 할당이 가능하고 상태가 없는 기본 람다[13]
  • 람다 init-capture에서 pack expansion을 지원[14]
  • 템플릿 파라미터에서 문자열 리터럴 사용 가능[15]

그 외 가능성이 있는 항목들:

라이브러리 변경 후보

  • 어토믹 스마트 포인터[24] (std::atomic_shared_ptr와 std::atomic_weak_ptr)
  • 확장된 future[25]
  • 래치와 배리어[26]
  • 네트워킹 확장[27], async, 기본적인 I/O 서비스, 타이머, 버퍼와 버퍼 기반 스트림, 소켓, 인터넷 프로토콜 등
  • 범위(range)[28]
  • 태스크 블록[29]

참조

각주

  1. ↑ “The next standard after C++17 will be C++20”., by Herb Sutter
  2. ↑ “Current Status : Standard C++”.
  3. ↑ “Working Draft, Standard for Programming Language C++” (PDF).
  4. ↑ “P0592R0: To boldly suggest an overall plan for C++20”.
  5. ↑ Herb Sutter. “Trip report: Summer ISO C++ standards meeting (Toronto)”.
  6. ↑ “P0606R0: Concepts Are Ready” (PDF).
  7. ↑ Tim Shen; Richard Smith. “Designated Initialization Wording”.
  8. ↑ Thomas Köppe. “Allow lambda capture [=, this]”.
  9. ↑ “Familiar template syntax for generic lambdas”.
  10. ↑ Herb Sutter. “Trip report: Fall ISO C++ standards meeting (Albuquerque)”.
  11. ↑ “Trip Report: C++ Standards Meeting in Albuquerque, November 2017” (미국 영어). 《There's Waldo!》. 2017년 11월 20일. 2017년 12월 11일에 확인함.
  12. ↑ “Wording for lambdas in unevaluated contexts” (PDF).
  13. ↑ “Default constructible and assignable stateless lambdas” (PDF).
  14. ↑ “Pack expansion in lambda init-capture”. 《www.open-std.org》. 2017년 12월 11일에 확인함.
  15. ↑ “String literals as non-type template parameters” (PDF).
  16. ↑ “N4649: Working Draft, Technical Specification on C++ Extensions for Coroutines” (PDF).
  17. ↑ “Clang 5 Release Notes on coroutines”.
  18. ↑ “N4637: Working Draft, Extensions to C++ for Modules” (PDF).
  19. ↑ “Clang 5 documentation on Modules”.
  20. ↑ “C++ Modules in VS 2015 Update 1”.
  21. ↑ “N3341: Transactional Language Constructs for C++” (PDF).
  22. ↑ “Reflections on the reflection proposals - Meeting C++” (영어). 《meetingcpp.com》. 2017년 6월 30일에 확인함.
  23. ↑ Herb Sutter. “Metaclasses” (PDF).
  24. ↑ “Atomic Smart Pointers”.
  25. ↑ “Functional in C++17 and C++20”.
  26. ↑ “P0342R0: Timing barriers”.
  27. ↑ “N4734: Working Draft, C++ Extensions for Networking” (PDF).
  28. ↑ “N4651: Working Draft, C++ Extensions for Ranges” (PDF).
  29. ↑ “Task Blocks”.