Namespaces
Variants

C++ identifier with special meaning: import (since C++20)

From cppreference.net
C++ language
General topics
Flow control
Conditional execution statements
Iteration statements (loops)
Jump statements
Functions
Function declaration
Lambda function expression
inline specifier
Dynamic exception specifications ( until C++17* )
noexcept specifier (C++11)
Exceptions
Namespaces
Types
Specifiers
constexpr (C++11)
consteval (C++20)
constinit (C++20)
Storage duration specifiers
Initialization
Expressions
Alternative representations
Literals
Boolean - Integer - Floating-point
Character - String - nullptr (C++11)
User-defined (C++11)
Utilities
Attributes (C++11)
Types
typedef declaration
Type alias declaration (C++11)
Casts
Memory allocation
Classes
Class-specific function properties
Special member functions
Templates
Miscellaneous

목차

사용법

참고 사항

기능 테스트 매크로 표준 기능
__cpp_modules 201907L (C++20) 모듈 — 핵심 언어 지원

예제

export module foo;
import bar;   // bar 모듈의 모든 모듈 인터페이스 유닛을 임포트합니다
import :baz;  // foo 모듈의 지정된 모듈 파티션 baz를 임포트합니다
import <set>; // <set> 헤더로부터 형성된 합성 헤더 유닛을 임포트합니다

참고 항목