|
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}),
|
|
2421 | 2421 | identity does not require a diagnostic.
|
2422 | 2422 |
|
2423 | 2423 | \pnum
|
2424 |
| -\begin{note} Linkage to non-\Cpp declarations can be achieved using a |
| 2424 | +\begin{note} Linkage to non-\Cpp{} declarations can be achieved using a |
2425 | 2425 | \grammarterm{linkage-specification}~(\ref{dcl.link}). \end{note}%
|
2426 | 2426 | \indextext{linkage|)}
|
2427 | 2427 |
|
|
2443 | 2443 |
|
2444 | 2444 | \pnum
|
2445 | 2445 | An implementation shall not predefine the \tcode{main} function. This
|
2446 |
| -function shall not be overloaded. Its type shall have \Cpp language linkage |
| 2446 | +function shall not be overloaded. Its type shall have \Cpp{} language linkage |
2447 | 2447 | and it shall have a declared return type of type
|
2448 | 2448 | \tcode{int}, but otherwise its type is \impldef{parameters to \tcode{main}}.
|
2449 | 2449 | \indextext{\idxcode{main} function!implementation-defined parameters to}%
|
|
2912 | 2912 | \indextext{\idxcode{new}}%
|
2913 | 2913 | \grammarterm{new-expression}{s}~(\ref{expr.new}), and destroyed using
|
2914 | 2914 | \indextext{\idxcode{delete}}%
|
2915 |
| -\grammarterm{delete-expression}{s}~(\ref{expr.delete}). A \Cpp implementation |
| 2915 | +\grammarterm{delete-expression}{s}~(\ref{expr.delete}). A \Cpp{} implementation |
2916 | 2916 | provides access to, and management of, dynamic storage via the global
|
2917 | 2917 | \defn{allocation functions} \tcode{operator new} and \tcode{operator
|
2918 | 2918 | new[]} and the global \defn{deallocation functions} \tcode{operator
|
|
2925 | 2925 | \pnum
|
2926 | 2926 | The library provides default definitions for the global allocation and
|
2927 | 2927 | deallocation functions. Some global allocation and deallocation
|
2928 |
| -functions are replaceable~(\ref{new.delete}). A \Cpp program shall |
| 2928 | +functions are replaceable~(\ref{new.delete}). A \Cpp{} program shall |
2929 | 2929 | provide at most one definition of a replaceable allocation or
|
2930 | 2930 | deallocation function. Any such function definition replaces the default
|
2931 | 2931 | version provided in the library~(\ref{replacement.functions}). The
|
|
2971 | 2971 | class~(\ref{class.free}).
|
2972 | 2972 |
|
2973 | 2973 | \pnum
|
2974 |
| -Any allocation and/or deallocation functions defined in a \Cpp program, |
| 2974 | +Any allocation and/or deallocation functions defined in a \Cpp{} program, |
2975 | 2975 | including the default versions in the library, shall conform to the
|
2976 | 2976 | semantics specified in~\ref{basic.stc.dynamic.allocation}
|
2977 | 2977 | and~\ref{basic.stc.dynamic.deallocation}.
|
|
3019 | 3019 | returned as a request for zero size is undefined.\footnote{The intent is
|
3020 | 3020 | to have \tcode{operator new()} implementable by
|
3021 | 3021 | calling \tcode{std::malloc()} or \tcode{std::calloc()}, so the rules are
|
3022 |
| -substantially the same. \Cpp differs from C in requiring a zero request |
| 3022 | +substantially the same. \Cpp{} differs from C in requiring a zero request |
3023 | 3023 | to return a non-null pointer.}
|
3024 | 3024 |
|
3025 | 3025 | \pnum
|
|
3042 | 3042 | A global allocation function is only called as the result of a new
|
3043 | 3043 | expression~(\ref{expr.new}), or called directly using the function call
|
3044 | 3044 | syntax~(\ref{expr.call}), or called indirectly through calls to the
|
3045 |
| -functions in the \Cpp standard library. \begin{note} In particular, a |
| 3045 | +functions in the \Cpp{} standard library. \begin{note} In particular, a |
3046 | 3046 | global allocation function is not called to allocate storage for objects
|
3047 | 3047 | with static storage duration~(\ref{basic.stc.static}), for objects or references
|
3048 | 3048 | with thread storage duration~(\ref{basic.stc.thread}), for objects of
|
|
3126 | 3126 | A pointer value is a \grammarterm{safely-derived pointer} to a dynamic object only if it
|
3127 | 3127 | has an object pointer type and it is one of the following:
|
3128 | 3128 | \begin{itemize}
|
3129 |
| -\item the value returned by a call to the \Cpp standard library implementation of |
| 3129 | +\item the value returned by a call to the \Cpp{} standard library implementation of |
3130 | 3130 | \tcode{::operator new(std\colcol{}size_t)} or
|
3131 | 3131 | \tcode{::operator new(std\colcol{}size_t, std\colcol{}align_val_t)}%
|
3132 | 3132 | ;\footnote{This section does not impose restrictions
|
3133 | 3133 | on indirection through pointers to memory not allocated by \tcode{::operator new}. This
|
3134 |
| -maintains the ability of many \Cpp implementations to use binary libraries and |
| 3134 | +maintains the ability of many \Cpp{} implementations to use binary libraries and |
3135 | 3135 | components written in other languages. In particular, this applies to C binaries,
|
3136 | 3136 | because indirection through pointers to memory allocated by \tcode{std\colcol{}malloc} is not restricted.}
|
3137 | 3137 |
|
|
3532 | 3532 | a set of bits in the object representation that determines a
|
3533 | 3533 | \defn{value}, which is one discrete element of an
|
3534 | 3534 | \impldef{values of a trivially copyable type} set of values.\footnote{The
|
3535 |
| -intent is that the memory model of \Cpp is compatible |
| 3535 | +intent is that the memory model of \Cpp{} is compatible |
3536 | 3536 | with that of ISO/IEC 9899 Programming Language C.}
|
3537 | 3537 |
|
3538 | 3538 | \pnum
|
|
0 commit comments