|
4 | 4 | \gramSec[gram.basic]{Basic concepts}
|
5 | 5 |
|
6 | 6 | \pnum
|
7 |
| -\begin{note} This Clause presents the basic concepts of the \Cpp language. |
| 7 | +\begin{note} This Clause presents the basic concepts of the \Cpp{} language. |
8 | 8 | It explains the difference between an object and a
|
9 | 9 | name and how they relate to the value categories for expressions.
|
10 | 10 | It introduces the concepts of a
|
11 |
| -declaration and a definition and presents \Cpp's |
| 11 | +declaration and a definition and presents \Cpp{}'s |
12 | 12 | notion of type, scope, linkage, and
|
13 | 13 | storage duration. The mechanisms for starting and
|
14 | 14 | terminating a program are discussed. Finally, this Clause presents the
|
|
206 | 206 | \pnum
|
207 | 207 | \begin{note}
|
208 | 208 | \indextext{implementation-generated}%
|
209 |
| -In some circumstances, \Cpp implementations implicitly define the |
| 209 | +In some circumstances, \Cpp{} implementations implicitly define the |
210 | 210 | default constructor~(\ref{class.ctor}),
|
211 | 211 | copy constructor~(\ref{class.copy}),
|
212 | 212 | move constructor~(\ref{class.copy}),
|
|
2429 | 2429 | identity does not require a diagnostic.
|
2430 | 2430 |
|
2431 | 2431 | \pnum
|
2432 |
| -\begin{note} Linkage to non-\Cpp declarations can be achieved using a |
| 2432 | +\begin{note} Linkage to non-\Cpp{} declarations can be achieved using a |
2433 | 2433 | \grammarterm{linkage-specification}~(\ref{dcl.link}). \end{note}%
|
2434 | 2434 | \indextext{linkage|)}
|
2435 | 2435 |
|
|
2455 | 2455 |
|
2456 | 2456 | \pnum
|
2457 | 2457 | An implementation shall not predefine the \tcode{main} function. This
|
2458 |
| -function shall not be overloaded. Its type shall have \Cpp language linkage |
| 2458 | +function shall not be overloaded. Its type shall have \Cpp{} language linkage |
2459 | 2459 | and it shall have a declared return type of type
|
2460 | 2460 | \tcode{int}, but otherwise its type is \impldef{parameters to \tcode{main}}.
|
2461 | 2461 | \indextext{\idxcode{main} function!implementation-defined parameters to}%
|
|
2952 | 2952 | \indextext{\idxcode{new}}%
|
2953 | 2953 | \grammarterm{new-expression}{s}~(\ref{expr.new}), and destroyed using
|
2954 | 2954 | \indextext{\idxcode{delete}}%
|
2955 |
| -\grammarterm{delete-expression}{s}~(\ref{expr.delete}). A \Cpp implementation |
| 2955 | +\grammarterm{delete-expression}{s}~(\ref{expr.delete}). A \Cpp{} implementation |
2956 | 2956 | provides access to, and management of, dynamic storage via the global
|
2957 | 2957 | \defn{allocation functions} \tcode{operator new} and \tcode{operator
|
2958 | 2958 | new[]} and the global \defn{deallocation functions} \tcode{operator
|
|
2965 | 2965 | \pnum
|
2966 | 2966 | The library provides default definitions for the global allocation and
|
2967 | 2967 | deallocation functions. Some global allocation and deallocation
|
2968 |
| -functions are replaceable~(\ref{new.delete}). A \Cpp program shall |
| 2968 | +functions are replaceable~(\ref{new.delete}). A \Cpp{} program shall |
2969 | 2969 | provide at most one definition of a replaceable allocation or
|
2970 | 2970 | deallocation function. Any such function definition replaces the default
|
2971 | 2971 | version provided in the library~(\ref{replacement.functions}). The
|
|
3011 | 3011 | class~(\ref{class.free}).
|
3012 | 3012 |
|
3013 | 3013 | \pnum
|
3014 |
| -Any allocation and/or deallocation functions defined in a \Cpp program, |
| 3014 | +Any allocation and/or deallocation functions defined in a \Cpp{} program, |
3015 | 3015 | including the default versions in the library, shall conform to the
|
3016 | 3016 | semantics specified in~\ref{basic.stc.dynamic.allocation}
|
3017 | 3017 | and~\ref{basic.stc.dynamic.deallocation}.
|
|
3059 | 3059 | returned as a request for zero size is undefined.\footnote{The intent is
|
3060 | 3060 | to have \tcode{operator new()} implementable by
|
3061 | 3061 | calling \tcode{std::malloc()} or \tcode{std::calloc()}, so the rules are
|
3062 |
| -substantially the same. \Cpp differs from C in requiring a zero request |
| 3062 | +substantially the same. \Cpp{} differs from C in requiring a zero request |
3063 | 3063 | to return a non-null pointer.}
|
3064 | 3064 |
|
3065 | 3065 | \pnum
|
|
3082 | 3082 | A global allocation function is only called as the result of a new
|
3083 | 3083 | expression~(\ref{expr.new}), or called directly using the function call
|
3084 | 3084 | syntax~(\ref{expr.call}), or called indirectly through calls to the
|
3085 |
| -functions in the \Cpp standard library. \begin{note} In particular, a |
| 3085 | +functions in the \Cpp{} standard library. \begin{note} In particular, a |
3086 | 3086 | global allocation function is not called to allocate storage for objects
|
3087 | 3087 | with static storage duration~(\ref{basic.stc.static}), for objects or references
|
3088 | 3088 | with thread storage duration~(\ref{basic.stc.thread}), for objects of
|
|
3165 | 3165 | A pointer value is a \defn{safely-derived pointer} to a dynamic object only if it
|
3166 | 3166 | has an object pointer type and it is one of the following:
|
3167 | 3167 | \begin{itemize}
|
3168 |
| -\item the value returned by a call to the \Cpp standard library implementation of |
| 3168 | +\item the value returned by a call to the \Cpp{} standard library implementation of |
3169 | 3169 | \tcode{::operator new(std::\brk{}size_t)} or
|
3170 | 3170 | \tcode{::operator new(std::size_t, std::align_val_t)}%
|
3171 | 3171 | ;\footnote{This section does not impose restrictions
|
3172 | 3172 | on indirection through pointers to memory not allocated by \tcode{::operator new}. This
|
3173 |
| -maintains the ability of many \Cpp implementations to use binary libraries and |
| 3173 | +maintains the ability of many \Cpp{} implementations to use binary libraries and |
3174 | 3174 | components written in other languages. In particular, this applies to C binaries,
|
3175 | 3175 | because indirection through pointers to memory allocated by \tcode{std::malloc} is not restricted.}
|
3176 | 3176 |
|
|
3578 | 3578 | a set of bits in the object representation that determines a
|
3579 | 3579 | \defn{value}, which is one discrete element of an
|
3580 | 3580 | \impldef{values of a trivially copyable type} set of values.\footnote{The
|
3581 |
| -intent is that the memory model of \Cpp is compatible |
| 3581 | +intent is that the memory model of \Cpp{} is compatible |
3582 | 3582 | with that of ISO/IEC 9899 Programming Language C.}
|
3583 | 3583 |
|
3584 | 3584 | \pnum
|
|
0 commit comments