This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

32
cppdraft/cpp/scope.md Normal file
View File

@@ -0,0 +1,32 @@
[cpp.scope]
# 15 Preprocessing directives [[cpp]](./#cpp)
## 15.7 Macro replacement [[cpp.replace]](cpp.replace#cpp.scope)
### 15.7.6 Scope of macro definitions [cpp.scope]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/preprocessor.tex#L2040)
A macro definition lasts
(independent of block structure)
until a corresponding#undef directive is encountered or
(if none is encountered)
until the end of the translation unit[.](#1.sentence-1)
Macro definitions have no significance after translation phase 4[.](#1.sentence-2)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/preprocessor.tex#L2050)
A preprocessing directive of the form
# undef [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
causes the specified identifier no longer to be defined as a macro name[.](#2.sentence-1)
It is ignored if the specified identifier is not currently defined as
a macro name[.](#2.sentence-2)