|
3696 | 3696 |
|
3697 | 3697 | \pnum |
3698 | 3698 | \indextext{storage duration!static}% |
3699 | | -All variables which do not have dynamic storage duration, do not have thread |
3700 | | -storage duration, and are not local |
3701 | | -have \defn{static storage duration}. The |
3702 | | -storage for these entities lasts for the duration of the |
| 3699 | +All variables which |
| 3700 | +\begin{itemize} |
| 3701 | +\item |
| 3702 | +do not have thread storage duration and |
| 3703 | +\item |
| 3704 | +belong to a namespace scope\iref{basic.scope.namespace} or |
| 3705 | +are first declared with |
| 3706 | +the \keyword{static} or \keyword{extern} keywords\iref{dcl.stc} |
| 3707 | +\end{itemize} |
| 3708 | +have \defn{static storage duration}. |
| 3709 | +The storage for these entities lasts for the duration of the |
3703 | 3710 | program~(\ref{basic.start.static}, \ref{basic.start.term}). |
3704 | 3711 |
|
3705 | 3712 | \pnum |
|
3709 | 3716 | eliminated as specified in~\ref{class.copy.elision}. |
3710 | 3717 |
|
3711 | 3718 | \pnum |
| 3719 | +\begin{note} |
3712 | 3720 | \indextext{object!local static@local \tcode{static}}% |
3713 | 3721 | The keyword \keyword{static} can be used to declare |
3714 | | -a block variable\iref{basic.scope.block} with static storage duration. |
3715 | | -\begin{note} |
| 3722 | +a block variable\iref{basic.scope.block} with static storage duration; |
3716 | 3723 | \ref{stmt.dcl} and \ref{basic.start.term} describe the |
3717 | 3724 | initialization and destruction of such variables. |
3718 | | -\end{note} |
3719 | | - |
3720 | | -\pnum |
3721 | 3725 | \indextext{member!class static@class \tcode{static}}% |
3722 | | -The keyword \keyword{static} applied to a class data member in a class |
3723 | | -definition gives the data member static storage duration. |
| 3726 | +The keyword \keyword{static} applied to |
| 3727 | +a class data member in a class definition |
| 3728 | +gives the data member static storage duration\iref{class.static.data}. |
| 3729 | +\end{note} |
3724 | 3730 |
|
3725 | 3731 | \rSec3[basic.stc.thread]{Thread storage duration} |
3726 | 3732 |
|
|
0 commit comments