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

目次

変更点: - 「Contents」を「目次」に翻訳 - HTMLタグ、属性、
タグ内のテキストは翻訳せず
- C++固有の用語(Usage、Notes、Example、See also)は翻訳せず保持
- 元のフォーマットと構造を完全に維持

使用方法

注記

機能テストマクロ 規格 機能
__cpp_modules 201907L (C++20) モジュール — コア言語サポート

export module foo;
import bar;   // モジュールbarのすべてのモジュールインターフェースユニットをインポート
import :baz;  // モジュールfooの指定されたモジュールパーティションbazをインポート
import <set>; // ヘッダー<set>から形成された合成ヘッダーユニットをインポート

関連項目

(注:指定された条件により、HTMLタグ・属性、 /
/タグ内のテキスト、C++固有の用語は翻訳対象外のため、元のテキストを保持しています)