Files
cppdraft_translate/cppdraft/depr/local.md
2025-10-25 03:02:53 +03:00

722 B

[depr.local]

Annex D (normative) Compatibility features [depr]

D.2 Non-local use of TU-local entities [depr.local]

1

#

A declaration of a non-TU-local entity that is an exposure ([basic.link]) is deprecated.

[Note 1:

Such a declaration in an importable module unit is ill-formed.

— end note]

[Example 1: namespace {struct A {void f() {}};} A h(); // deprecated: not internal linkageinline void g() {A().f();} // deprecated: inline and not internal linkage — end example]