File tree Expand file tree Collapse file tree 3 files changed +14
-20
lines changed Expand file tree Collapse file tree 3 files changed +14
-20
lines changed Original file line number Diff line number Diff line change 986
986
\end {codeblock }
987
987
988
988
The declarative regions of \tcode {T}, \tcode {U} and \tcode {V} are the
989
- \grammarterm {template-declaration}{s} on lines \tcode { \# 1} , \tcode { \# 2} and \tcode { \# 3} ,
989
+ \grammarterm {template-declaration}{s} on lines \# 1 , \# 2, and \# 3 ,
990
990
respectively. But the names \tcode {A}, \tcode {f}, \tcode {g} and \tcode {C} all belong to
991
991
the same declarative region --- namely, the \grammarterm {namespace-body} of \tcode {N}.
992
992
(\tcode {g} is still considered to belong to this declarative region in spite of its
2297
2297
2298
2298
There are three objects named \tcode {i} in this program. The object with
2299
2299
internal linkage introduced by the declaration in global scope (line
2300
- \tcode { \# 1} ), the object with automatic storage duration and no linkage
2301
- introduced by the declaration on line \tcode { \# 2} , and the object with
2300
+ \# 1 ), the object with automatic storage duration and no linkage
2301
+ introduced by the declaration on line \# 2 , and the object with
2302
2302
static storage duration and external linkage introduced by the
2303
- declaration on line \tcode { \# 3} . \end {example }
2303
+ declaration on line \# 3 . \end {example }
2304
2304
2305
2305
\pnum
2306
2306
When a block scope declaration of an entity with linkage is not found to
Original file line number Diff line number Diff line change 296
296
297
297
\begin {note }
298
298
If a program could assign a pointer of type \tcode {T**} to a pointer of
299
- type \tcode {const} \tcode {T**} (that is, if line \tcode { \# 1} below were
299
+ type \tcode {const} \tcode {T**} (that is, if line \# 1 below were
300
300
allowed), a program could inadvertently modify a \tcode {const} object
301
- (as it is done on line \tcode { \# 2} ). For example,
301
+ (as it is done on line \# 2 ). For example,
302
302
303
303
\begin {codeblock }
304
304
int main() {
Original file line number Diff line number Diff line change 2458
2458
2459
2459
According to the ordering rules for function templates,
2460
2460
the function template
2461
- \tcode {B}
2461
+ \placeholder {B}
2462
2462
is more specialized than the function template
2463
- \tcode {A}
2463
+ \placeholder {A}
2464
2464
and
2465
2465
the function template
2466
- \tcode {D}
2466
+ \placeholder {D}
2467
2467
is more specialized than the function template
2468
- \tcode {C}.
2469
- Therefore,
2470
- the partial specialization
2471
- \tcode {\# 2}
2472
- is more specialized than the partial specialization
2473
- \tcode {\# 1}
2474
- and
2475
- the partial specialization
2476
- \tcode {\# 4}
2477
- is more specialized than the partial specialization
2478
- \tcode {\# 3}.
2468
+ \placeholder {C}.
2469
+ Therefore, the partial specialization \# 2
2470
+ is more specialized than the partial specialization \# 1
2471
+ and the partial specialization \# 4
2472
+ is more specialized than the partial specialization \# 3.
2479
2473
\end {example }
2480
2474
2481
2475
\rSec 3[temp.class.spec.mfunc]{Members of class template specializations}
You can’t perform that action at this time.
0 commit comments