File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 498
498
\begin {example }
499
499
500
500
\begin {codeblock }
501
- //translation unit 1:
501
+ // translation unit 1:
502
502
struct X {
503
503
X(int, int);
504
504
X(int, int, int);
509
509
};
510
510
D d2; // \tcode {X(int, int)} called by \tcode {D()}
511
511
512
- //translation unit 2:
512
+ // translation unit 2:
513
513
struct X {
514
514
X(int, int);
515
515
X(int, int, int);
Original file line number Diff line number Diff line change 3553
3553
// with C language linkage has two definitions
3554
3554
}
3555
3555
3556
- int A::f() { return 98; } //definition for the function \tcode {f} with C language linkage
3556
+ int A::f() { return 98; } // definition for the function \tcode {f} with C language linkage
3557
3557
extern "C" int h() { return 97; } // definition for the function \tcode {h} with C language linkage
3558
3558
// \tcode {A::h} and \tcode {::h} refer to the same function
3559
3559
\end {codeblock }
Original file line number Diff line number Diff line change 1365
1365
1366
1366
void f() {
1367
1367
B* bp = new D;
1368
- delete bp; //1: uses \tcode {D::operator delete(void*)}
1368
+ delete bp; // 1: uses \tcode {D::operator delete(void*)}
1369
1369
}
1370
1370
\end {codeblock }
1371
1371
2207
2207
B bobj; // definition of \tcode {bobj}
2208
2208
2209
2209
extern X xobj;
2210
- int* p3 = &xobj.i; //OK, \tcode {X} is a trivial class
2210
+ int* p3 = &xobj.i; // OK, \tcode {X} is a trivial class
2211
2211
X xobj;
2212
2212
\end {codeblock }
2213
2213
Original file line number Diff line number Diff line change 2592
2592
2593
2593
\begin {minipage }{.45\hsize }
2594
2594
\begin {codeblock }
2595
- // file1.c
2595
+ // translation unit 1:
2596
2596
template<class T>
2597
2597
void f(T*);
2598
2598
void g(int* p) {
2602
2602
\end {minipage }
2603
2603
\begin {minipage }{.45\hsize }
2604
2604
\begin {codeblock }
2605
- // file2.c
2605
+ // translation unit 2:
2606
2606
template<class T>
2607
2607
void f(T);
2608
2608
void h(int* p) {
5435
5435
// member template specialization
5436
5436
template<> template<class X1> void A<int>::g1(int, X1);
5437
5437
5438
- //member template specialization
5438
+ // member template specialization
5439
5439
template<> template<>
5440
5440
void A<int>::g1(int, char); // \tcode {X1} deduced as \tcode {char}
5441
5441
template<> template<>
You can’t perform that action at this time.
0 commit comments