|
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}),
|
|
2422 | 2422 | identity does not require a diagnostic.
|
2423 | 2423 |
|
2424 | 2424 | \pnum
|
2425 |
| -\begin{note} Linkage to non-\Cpp declarations can be achieved using a |
| 2425 | +\begin{note} Linkage to non-\Cpp{} declarations can be achieved using a |
2426 | 2426 | \grammarterm{linkage-specification}~(\ref{dcl.link}). \end{note}%
|
2427 | 2427 | \indextext{linkage|)}
|
2428 | 2428 |
|
|
2448 | 2448 |
|
2449 | 2449 | \pnum
|
2450 | 2450 | An implementation shall not predefine the \tcode{main} function. This
|
2451 |
| -function shall not be overloaded. Its type shall have \Cpp language linkage |
| 2451 | +function shall not be overloaded. Its type shall have \Cpp{} language linkage |
2452 | 2452 | and it shall have a declared return type of type
|
2453 | 2453 | \tcode{int}, but otherwise its type is \impldef{parameters to \tcode{main}}.
|
2454 | 2454 | \indextext{\idxcode{main} function!implementation-defined parameters to}%
|
|
2945 | 2945 | \indextext{\idxcode{new}}%
|
2946 | 2946 | \grammarterm{new-expression}{s}~(\ref{expr.new}), and destroyed using
|
2947 | 2947 | \indextext{\idxcode{delete}}%
|
2948 |
| -\grammarterm{delete-expression}{s}~(\ref{expr.delete}). A \Cpp implementation |
| 2948 | +\grammarterm{delete-expression}{s}~(\ref{expr.delete}). A \Cpp{} implementation |
2949 | 2949 | provides access to, and management of, dynamic storage via the global
|
2950 | 2950 | \defn{allocation functions} \tcode{operator new} and \tcode{operator
|
2951 | 2951 | new[]} and the global \defn{deallocation functions} \tcode{operator
|
|
2958 | 2958 | \pnum
|
2959 | 2959 | The library provides default definitions for the global allocation and
|
2960 | 2960 | deallocation functions. Some global allocation and deallocation
|
2961 |
| -functions are replaceable~(\ref{new.delete}). A \Cpp program shall |
| 2961 | +functions are replaceable~(\ref{new.delete}). A \Cpp{} program shall |
2962 | 2962 | provide at most one definition of a replaceable allocation or
|
2963 | 2963 | deallocation function. Any such function definition replaces the default
|
2964 | 2964 | version provided in the library~(\ref{replacement.functions}). The
|
|
3004 | 3004 | class~(\ref{class.free}).
|
3005 | 3005 |
|
3006 | 3006 | \pnum
|
3007 |
| -Any allocation and/or deallocation functions defined in a \Cpp program, |
| 3007 | +Any allocation and/or deallocation functions defined in a \Cpp{} program, |
3008 | 3008 | including the default versions in the library, shall conform to the
|
3009 | 3009 | semantics specified in~\ref{basic.stc.dynamic.allocation}
|
3010 | 3010 | and~\ref{basic.stc.dynamic.deallocation}.
|
|
3052 | 3052 | returned as a request for zero size is undefined.\footnote{The intent is
|
3053 | 3053 | to have \tcode{operator new()} implementable by
|
3054 | 3054 | calling \tcode{std::malloc()} or \tcode{std::calloc()}, so the rules are
|
3055 |
| -substantially the same. \Cpp differs from C in requiring a zero request |
| 3055 | +substantially the same. \Cpp{} differs from C in requiring a zero request |
3056 | 3056 | to return a non-null pointer.}
|
3057 | 3057 |
|
3058 | 3058 | \pnum
|
|
3075 | 3075 | A global allocation function is only called as the result of a new
|
3076 | 3076 | expression~(\ref{expr.new}), or called directly using the function call
|
3077 | 3077 | syntax~(\ref{expr.call}), or called indirectly through calls to the
|
3078 |
| -functions in the \Cpp standard library. \begin{note} In particular, a |
| 3078 | +functions in the \Cpp{} standard library. \begin{note} In particular, a |
3079 | 3079 | global allocation function is not called to allocate storage for objects
|
3080 | 3080 | with static storage duration~(\ref{basic.stc.static}), for objects or references
|
3081 | 3081 | with thread storage duration~(\ref{basic.stc.thread}), for objects of
|
|
3158 | 3158 | A pointer value is a \defn{safely-derived pointer} to a dynamic object only if it
|
3159 | 3159 | has an object pointer type and it is one of the following:
|
3160 | 3160 | \begin{itemize}
|
3161 |
| -\item the value returned by a call to the \Cpp standard library implementation of |
| 3161 | +\item the value returned by a call to the \Cpp{} standard library implementation of |
3162 | 3162 | \tcode{::operator new(std::\brk{}size_t)} or
|
3163 | 3163 | \tcode{::operator new(std::size_t, std::align_val_t)}%
|
3164 | 3164 | ;\footnote{This section does not impose restrictions
|
3165 | 3165 | on indirection through pointers to memory not allocated by \tcode{::operator new}. This
|
3166 |
| -maintains the ability of many \Cpp implementations to use binary libraries and |
| 3166 | +maintains the ability of many \Cpp{} implementations to use binary libraries and |
3167 | 3167 | components written in other languages. In particular, this applies to C binaries,
|
3168 | 3168 | because indirection through pointers to memory allocated by \tcode{std::malloc} is not restricted.}
|
3169 | 3169 |
|
|
3568 | 3568 | a set of bits in the object representation that determines a
|
3569 | 3569 | \defn{value}, which is one discrete element of an
|
3570 | 3570 | \impldef{values of a trivially copyable type} set of values.\footnote{The
|
3571 |
| -intent is that the memory model of \Cpp is compatible |
| 3571 | +intent is that the memory model of \Cpp{} is compatible |
3572 | 3572 | with that of ISO/IEC 9899 Programming Language C.}
|
3573 | 3573 |
|
3574 | 3574 | \pnum
|
|
0 commit comments